News:

Looking for documentation? Take a look on our wiki

Main Menu

Suggest to passing $this to plgVmOnAddToCart

Started by dragonself, April 22, 2014, 05:09:42 AM

Previous topic - Next topic

dragonself

VM 2.6.0
helpers/cart.php Line 588
From
$addToCartReturnValues = $dispatcher->trigger('plgVmOnAddToCart',array(&$product));
to
$addToCartReturnValues = $dispatcher->trigger('plgVmOnAddToCart',array(&$product, $this));

The reason to suggest this is because without the change, custom field plugin cannot combine the same product(with the same custom field option) in the cart

Example, I have a custom field plugin option for product color ( green, red, blue). If I select green and click "Add to cart" twice, it appear as two row of green X 1 in the cart. Which 1 row of green X 2 is more make sense.

Thanks
Philip


lindapowers


Milbo

Useless to talk about vm2.6 for that. This would change the API and is therefore for vm3 and I give the idea to take a look there
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

and yeh please check all triggers of vm3, we are open for suggestions there.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/