We had a coupon code running from November 12 - November 16
Working fine for the most part.
Then we ran into an issue with a client's order changing hte status to complete. It would go to Cancelled.
I figure it was either the fraud thing or a coupon issue.
Well, I went on the front end as a guest and tried the coupon which was set to expire the next day and got the dreaded:
warning: Coupon is either invalid, expired or reached its usage limit! opencart
I extended the coupon date again (for uses we have 999 and 999...so really unlimited use)
Still the coupon didn't work.
I deleted the coupon and added it again then it worked.
Any ideas what causes this?
OC 3.0.4.0
Working fine for the most part.
Then we ran into an issue with a client's order changing hte status to complete. It would go to Cancelled.
I figure it was either the fraud thing or a coupon issue.
Well, I went on the front end as a guest and tried the coupon which was set to expire the next day and got the dreaded:
warning: Coupon is either invalid, expired or reached its usage limit! opencart
I extended the coupon date again (for uses we have 999 and 999...so really unlimited use)
Still the coupon didn't work.
I deleted the coupon and added it again then it worked.
Any ideas what causes this?
OC 3.0.4.0
Self Taught Opencart User & Developer Since 2010.
Set it to start one day before and to end one day after and see if that solves the problem.
The code is
and maybe you are expecting it to be
The code is
Code: Select all
$coupon_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "coupon` WHERE code = '" . $this->db->escape($code) . "' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) AND status = '1'");
Code: Select all
$coupon_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "coupon` WHERE code = '" . $this->db->escape($code) . "' AND ((date_start = '0000-00-00' OR date_start <= NOW()) AND (date_end = '0000-00-00' OR date_end >= NOW())) AND status = '1'");
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Thanks for the suggestion, Mona.
We normally put the coupon to start 1 day before and 1 day after normally. We do this because I think our server time is a few hours ahead of our time so in the past the coupon has expired when put on the actual end date.
Very weird situation that I'll have to monitor especially with holiday sales coming up.
We normally put the coupon to start 1 day before and 1 day after normally. We do this because I think our server time is a few hours ahead of our time so in the past the coupon has expired when put on the actual end date.
Very weird situation that I'll have to monitor especially with holiday sales coming up.
Self Taught Opencart User & Developer Since 2010.
Maybe you have a situation like this ?
https://www.opencart.com/index.php?rout ... n_id=40580
https://www.opencart.com/index.php?rout ... n_id=40580
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
possible. That is for 2.3.0.2. Not sure if it will work for 3.0.4.0 but will see on my developer server.by mona wrote: ↑Sat Nov 16, 2024 8:09 pmMaybe you have a situation like this ?
https://www.opencart.com/index.php?rout ... n_id=40580
Thank you for the suggestion
Self Taught Opencart User & Developer Since 2010.
Who is online
Users browsing this forum: Bing [Bot] and 25 guests