Hello, I am using VM 2.0.14.
I am trying to write a plugin and would like a suggestion on which hook I should use.
I need to set an action on "add to cart". I tried with a "VMCustom" plugin, but it seems to me that this is mainly related to custom fields for specific products. I don't want to add a custom field to all my products to be able to trigger my action.
Is there any better hook that I am missing?
Thank you for your time.
Great question.
Is there a plugin method which is triggered when I add a product to the cart (or somwhere around getCart() function)?
You can use a payment or shipment plugin. This get triggered too.
So it depend your need, but you can use 'plgVmOnAddToCartFilter' in VM 3 if a customfield exist or a Joomla plugin too for a more general way to check add to cart.
J3.5.1
VM3.0.16
Hi,
Where's a good place to go to find out more about how to do this ? I need to reprice my cart when a particular product is added to it or taken out (buying membership product gives you discount on all the other ones). I'm piecing the puzzle together but it's hard to know where to start.
Any tips gratefully received !
David
Quote from: dmb on April 28, 2016, 10:40:12 AM
J3.5.1
VM3.0.16
Hi,
Where's a good place to go to find out more about how to do this ? I need to reprice my cart when a particular product is added to it or taken out (buying membership product gives you discount on all the other ones). I'm piecing the puzzle together but it's hard to know where to start.
Any tips gratefully received !
David
Awo coupon PRO can do many of this hooks.