Thank you for testing
.
I disabled AwoCoupon on my store, and now it works fine too - the coupon doesn't go away until the customer actively removes it from the cart (which is quite unlikely to happen
)
However, AwoCoupon is essential for me - and is likely to be for many other VM users as well - even the free version provides many features that the native VM coupon system is missing.
I guess that native coupon works even with awocoupon installed, but to get rid of the issue described above we need to insert the coupon in awocoupon instead, I suppose?
Around line 209 :
$q ="INSERT INTO #__virtuemart_coupons
(coupon_used , coupon_code, percent_or_total , coupon_type, coupon_value, coupon_start_date, created_on)
VALUES
('0' , '".$coupon_code."' , 'total' , 'gift' , '". $coupon_price ."', '0000-00-00 00:00:00' , '".date('Y-m-d H:i:s')."')";
$db->setQuery($q);
$db->execute();
AwoCoupon stores the coupons in it's own table, #__awocoupon , my coding skills are limited but I'll play around with it and see if I can write code that works
.
Ultimately, a setting in the plugin parameters where we can chose if we're using awocoupon or native VM coupons would be nice of course, but I'll mess with the above code and report back my results
.
EDIT : Nordmograph, in case adding support for AwoCoupon would be in your interest as well, I believe this thread has the info we need to create the coupon :
awodev.com/forum/awocoupon/help-section/...ns-directly-database
Meanwhile, I'll keep experimenting on my own hehe
Cheers