Page 1 of 1

broken coupons in vm3.2.6 (not OPC related !)

PostPosted: Fri Nov 24, 2017 11:22 pm
by admin
the vm3.2.6 includes an error where you cannot create a new coupon code.

to fix the problem you may want to edit:
\administrator\components\com_virtuemart\views\coupon\view.html.php

find this line (should be line 92):
Code: Select all
$coupon->coupon_expiry_date = $_expDate->format("U");


and replace with:
Code: Select all
$coupon->coupon_expiry_date = $_expDate->format("Y-m-d H:i:s");


best regards, stan

Re: broken coupons in vm3.2.6 (not OPC related !)

PostPosted: Wed Nov 29, 2017 2:09 pm
by admin
to get the coupon expirity always to the midnight you may want to use:
Code: Select all
$coupon->coupon_expiry_date = $_expDate->format("Y-m-d");


which should be still a valid date for the purpose (not tested).

best regards, stan