addProductToCollection
The addProductToCollection hook is triggered every time a product is added to the cart.
It allows manipulating the number of items added to the cart.
Parameters
-
\Isotope\Interfaces\IsotopeProduct
$productThe product that is added to the collection.
-
int
$quantityThe quantity of the product that is added to the collection.
-
\Isotope\Interfaces\IsotopeProductCollection
$collectionThe collection the product is added to.
-
array
$configThe model configuration.