I'm running OpenCart 184.108.40.206. 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.
Coupon-Error.jpg (64.77 KiB) Viewed 1339 times
No, it is not.
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.
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...
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.
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.