| Hook | actionOverrideProductQuantity |
|---|---|
| Locations | FO |
| Type | action |
| Origin | core |
| Aliases | |
| Description | Allows modules to override the final product quantity returned by Product::getQuantity(), including cart-aware calculations. |
This hook has a $check_exceptions parameter set to false (check permission exceptions, see explaination here).
This hook has a $chain parameter set to true (hook will chain the return of hook module, see explaination here).
| Origin | File |
|---|---|
| core | classes/Product.php |
Hook::exec(
'actionOverrideProductQuantity',
[
'id_product' => $idProduct,
'id_product_attribute' => $idProductAttribute,
'cart' => $cart,
'cacheIsPack' => $cacheIsPack,
'idCustomization' => $idCustomization,
'isCartProvided' => $cart !== null, // true if $cart is passed to reduce the quantity by the amount in cart
],
null,
false,
true,
false,
null,
true
);