Post by AidanCKY » Wed Feb 07, 2018 9:03 am

Hello

I'm running OpenCart 2.3.0.2. Using the standard coupon feature is causing me issues - we have a coupon with a 15% discount.

"Uses Per Coupon" is Blank, for unlimited
"Uses Per Customer" is 1.

If it's entered on the checkout page multiple times, it allows customers to discount the cart 5+ times. You can also use the coupon code with a Space, 2 spaces, 3 spaces at the end and it still works.

Shop is also running Journal 2.

Any ideas?

Attachments

Coupon-Error.jpg

Coupon-Error.jpg (64.77 KiB) Viewed 1156 times


Newbie

Posts

Joined
Wed Feb 07, 2018 8:59 am

Post by paulfeakins » Thu Feb 08, 2018 6:43 pm

Can you confirm if this happens on a fresh install of 2.3.0.2?

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by thekrotek » Thu Feb 08, 2018 6:55 pm

All your issues are not related to Coupons extension, especially considering the multiple discounting. Default Coupons extension is pretty weak and has a very few options, but works more or less proper. I'd suggest you to start looking somewhere else.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by sagraphics » Wed Feb 21, 2018 8:34 pm

We are having the exact same problem. Uses per customer is blank and uses per coupon set to 1 but coupon can be used multiple times.

New member

Posts

Joined
Sat Nov 11, 2017 3:41 am

Post by thekrotek » Wed Feb 21, 2018 8:55 pm

sagraphics wrote:
Wed Feb 21, 2018 8:34 pm
We are having the exact same problem. Uses per customer is blank and uses per coupon set to 1 but coupon can be used multiple times.
No, it is not.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by sagraphics » Wed Feb 21, 2018 9:13 pm

I am not sure what you mean by "no it is not". We supply credit notes in the form of coupons for customers, and we have tested with a used coupon where the number of uses is set to one but it can be used time and time again. There is no history recorded for the coupon. I've searched through the database tables for coupon history and it seems the only coupon uses that are logged are ones used by a logged in user.

New member

Posts

Joined
Sat Nov 11, 2017 3:41 am

Post by Johnathan » Wed Feb 21, 2018 11:35 pm

Coupon counts are only decremented when the order meets one of the Processing or Complete order statuses, as set in System > Settings. My guess is that you're testing the same coupon with an order that does not meet one of those statuses, so its count hasn't been decremented. Try changing the order to one of those statuses (e.g. "Complete", by default) and see if it changes the behavior of trying to use it again.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by sagraphics » Wed Feb 21, 2018 11:52 pm

Hi - we've marked the order as completed and the coupon history is still not recorded and the coupon can still be used.

New member

Posts

Joined
Sat Nov 11, 2017 3:41 am

Post by straightlight » Thu Feb 22, 2018 7:22 am

sagraphics wrote:
Wed Feb 21, 2018 11:52 pm
Hi - we've marked the order as completed and the coupon history is still not recorded and the coupon can still be used.
For which OC version are you addressing this issue?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sagraphics » Thu Feb 22, 2018 8:31 pm

Version 2.0.1.1

New member

Posts

Joined
Sat Nov 11, 2017 3:41 am

Post by MrMac78 » Wed Mar 07, 2018 4:49 am

Hi, im having the very same issue.. (and tested on a clean install of OC 2.3.0.2 no mods)

Uses Per Coupon: blank
Uses Per Customer: 1

result - customer can use the coupon to get 10% discount an unlimited amount of times

However, what I did notice was the following orders where the customer has used that coupon more than once, the following order's status' are all set to Cancelled. I think it has a relation to this issue https://github.com/opencart/opencart/issues/3657

Changing the order status to Pending or Complete (as suggested above) had no effect, the customer can still use the coupon an unlimited amount of times.

Reading Daniel's rants to ppl's complaints about this order status & coupon issue in the github thread suggests that this is by design? WTF?

Anyway, even setting the coupon to
Uses Per Coupon: 2
Uses Per Customer: 1
Allows the coupon to be used an unlimited amount of time...
WTF!!!
How can this be fixed to work as it should???? And if it can't, hHas this be 'fixed' in OC3?

If not, think it's time to jump ship and try a new cart.. having read Daniel's comments in said thread and attitude to bugs. Shame really.

New member

Posts

Joined
Sat May 13, 2017 8:41 pm

Post by sagraphics » Wed Mar 07, 2018 5:54 pm

It really is ridiculous! I have much experience of both Virtuemart and Woocommerce and both function brilliantly in terms of coupons, so I don't see why OC shouldn't behave in the same way! For me, it seems to work when a user logs in to checkout, but not with a guest user. It's a site I've inherited and my client is starting to get impatient for a fix!

New member

Posts

Joined
Sat Nov 11, 2017 3:41 am

Post by vipartneriai » Tue Aug 28, 2018 8:17 pm

I had the same problem on my OC 2.3.0.2. I also have a coupon, that might be used 1 time per customer, but found out that sometimes the same customer has used the same coupon twice.
I've tried to do tests and check how OC stores and checks info about coupons usage .

OC stores information about coupon usage into separate table oc_coupon_history. 2. When coupon is applied, OC checks this table by coupon_id and user_id and counts how many times the same coupon was already used by the same user.
I did the test order and found out, that OC stores coupon history record ONLY after order has reached Processing Order Status, which is defined in site settings. In our case Processing status was set to 3 (Shipped), before 1 (Received) and 2 (Processing).
But default new order status is 1 (Received), so while it has not reached 3 (Shipped), coupon history is not recorded, and so customer is able to use this code again. So only after I have done order edit and status set to Shipped, coupon history was recorded and coupon could not be used second time.

But then I tried to repeat the same but update order status to Shipped in order info window. And I was very surprised, that changing order status in this window does not create coupon history record! Completed status has not worked as well and only when I have set status to Shipped or Completed in order edit window it has been recorded.

So in my case the solution was to remember - when coupon is used, always change the order status to Shipped or Complete in order edit window.

Hope this information will be useful.

Newbie

Posts

Joined
Thu Oct 19, 2017 3:10 pm

Post by Johnathan » Tue Aug 28, 2018 10:42 pm

Coupons are counted as "used" when the order reaches a "Processing" or "Complete" status, as set in System > Settings > Option. If you want a coupon to be counted when reaching the status "Received", then you should add that to your "Processing" statuses in that area. That should also solve your issue, though changing the status to "Shipped" works as well.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by foobarac » Wed Dec 12, 2018 12:26 am

I confirm what Johnathan is saying is correct (in 3.0.2.0 anyways).

Newbie

Posts

Joined
Fri Sep 21, 2018 9:46 pm
Who is online

Users browsing this forum: No registered users and 9 guests