News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Plugin that executes when "add to cart"

Started by Genius WebDesign, December 17, 2014, 16:57:47 PM

Previous topic - Next topic

Genius WebDesign

Hi,

I need to program a plugin for Virtuemart 2.6 that executes a code whenever a product is added to cart.
Specifically I need to update the cart session data so that "paymentCurrency" is set to current front-end chosen currency.

What class do I need to tap into in order to update cart session when product is added to cart?

Genius WebDesign

Maybe a better solution would be to program the plugin to trigger whenever currency is changed, if that is possible?
Basically so cart session is updated with current currency data at all times.

Genius WebDesign

Hi again,

After some considerations I have found out that a plugin is not needed for this.
I simply need to apply PHP script to update cart session with custom HTML/PHP module and assign it to check out page.

Milbo

in vm3, the trigger is

plgVmPrepareCartProduct

Your method wont work in vm3, cause it would be recognised as manipulation and deleted.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/