VM 2.0.26d | J 2.5.18 (before you even ask - NO, we can't upgrade the site. Too many core mods - and they weren't our idea...)
Coupons are still usable after their expiration dates... even if we "unpublish" them (click the checkbox and hit "unpublish" at the top).
Any idea as to why?
well.. could be a bug that has been fixed in the 100 or so versions since 2.0.26d
when u get hacked will you update then? ;)
Thank you for being absolutely NO help. It's not my choice not to upgrade - it's the clients.
FFS nobody here would run such an old and insecure version to check, but since coupon expiry works with current versions somewhere down the line if it was a bug then it has been fixed.
Now you maybe see why we do not support core hacks.
You had this same problem a year ago so I guess it is not important. In any case z-analysts provided a workaround. http://forum.virtuemart.net/index.php?topic=122378.msg435642#msg435642
That was a different client, we'd forgotten about it. We ended up completely redoing their cart in a different system. VM is never our first choice for a shopping cart system.
And let me stress, YET AGAIN, this was NOT our idea! We're simply trying to find a solution for the client for an existing site they refuse to upgrade.
And I assume they are happy with their Windows 98, their php 4.0 and Android 2 on their phone.....
Tyres are bald and brakes shot but what the hell, will do for another year....
(must get that gas leak fixed one day)
You realise of course when they are hacked it will be u they blame?
here is the fix:
components/com_virtuemart/helpers/coupon.php
line 51
change
IFNULL( 0, IF( NOW() > `coupon_expiry_date`, 1, 0 )) AS ended
to
IFNULL( IF( NOW() > `coupon_expiry_date`, 1, 0 ), 0) AS ended
@trilogic I have no idea what version your "fix" applies to, but this thread is 4 years old and the code you mention is considerably different in current versions.