VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Pirosoft on October 14, 2012, 11:31:32 AM

Title: plugin on AddToCart
Post by: Pirosoft on October 14, 2012, 11:31:32 AM
Hi, in helpers/cart.php is this code in function add (when a user add a product to cart):
// on returning false the product have not to be added to cart
if ( $dispatcher->trigger('plgVmOnAddToCart',array(&$product)) === false )
continue;

I created the plugin plgVmcalculationTest and i think this code trigger the plugin plgVmcalculationTest with function plgVmOnAddToCart.
In this function i send a email for test, so evry time i add a product to cart should send me a email, but some time send some time no...

why? it is normal that the event is active only a few times?

thanks