This is a Virtuemart 2 Plugin.
Automatically trigger a coupon code when a product is added to the shopping cart.
Its very simple, install the plugin, enable it, and enter the coupon code you want to be automatically triggered. If a coupon code already exists in the cart, the auto coupon code is not run.
http://awodev.com/products#plg_awocoupontrigger
it's a great plugin but it needs some options:
- when you update the quantity the plugin doesn't load/unload the coupon
- should have the option to select multiple coupons and apply them based on cart total value
Thanks for the feedback. I fixed the update/delete problem. It would be best to uninstall the previous version before installing this one as it is no longer a vmpayment plugin, it is now a system plugin. To your other points:
1) cart total value - this can already be set up within the coupon you are creating, it would be redundant to add this feature
2) multiple coupons - this is not something supported by Virtuemart, it will only allow one coupon at a time so not sure it is very useful
Can you apply this to more than 1 coupon?
I have several coupons that I would like to auto trigger
Hi,
Virtuemart coupon system is built to accept just 1 coupon code, so even if there was a box for 2, it will only accept the first one.
If you need that functionality, then AwoCoupon pro will allow this through parent coupons.
Quote from: seyi on June 25, 2012, 18:31:23 PM
This is a Virtuemart 2 Plugin.
Automatically trigger a coupon code when a product is added to the shopping cart.
Its very simple, install the plugin, enable it, and enter the coupon code you want to be automatically triggered. If a coupon code already exists in the cart, the auto coupon code is not run.
http://awodev.com/products#plg_awocoupontrigger
Installed this, works fine apart from the discount being applied to the final price, it doesnt actually display a notification that the customer is saving or that there has been a discount applied?
Hello,
No, it does not display a message when a coupon is added to the cart. But I think its easy enough
in www/plugins/system/awocoupontrigger/awocoupontrigger.php, around line 34 is this
<?php
$cart->setCouponCode($coupon_code);
$cart->getCartPrices(); // needed it to fix the cart prices
?>
Change it to this
<?php
$orig_code = $cart->couponCode;
$msg = $cart->setCouponCode($coupon_code);
$cart->getCartPrices(); // needed it to fix the cart prices
if(empty($orig_code) && !empty($msg)) {
JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart', FALSE),$msg);
}
?>