VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: welrachid on December 15, 2014, 13:58:43 PM

Title: While migrating FROM VM2 -> VM3 : plgVmOnAddToCart
Post by: welrachid on December 15, 2014, 13:58:43 PM
Hi everyone.

im trying to migrate an old customplugin to work on VM3. Therefore i need to know what happened to plgVmOnAddToCart event. It is never called and i in the components/com_virtuemart/helpers/cart.php it is no longer found. NONE of the documentation i have found about VM2 -> VM3 says anything about removing such calls.

Has anyone found a solution to this?

Thanks
Title: Re: While migrating FROM VM2 -> VM3 : plgVmOnAddToCart
Post by: alatak on December 15, 2014, 15:36:02 PM
Hello
This trigger has been replaced by plgVmPrepareCartProduct.
Title: Re: While migrating FROM VM2 -> VM3 : plgVmOnAddToCart
Post by: welrachid on January 07, 2015, 11:44:47 AM
Hello

Thanks for the reply. I've been looking some more into this, and it seems like my plgVmPrepareCartProduct method is ONLY called if i have enabled the textinput module, but it is only called once with wrong parameters
      if ($customfield->custom_element !==$this->_name) return ;

$customfield->custom_element is never set to the name of my customfield
Is there a place that i should "register" that my plugin is using this?


Layout position for BOTH plugins is
addtocart