A client has reported an issue, which I was able to duplicate. A Google search showed others reporting the same issue including on GitHub, but I couldn't find a solution.
Installation is OpenCart 2.1.0.1
I also tested on OpenCart 2.0.3.1 and the bug happens in that install too.
Bug / Issue:
On the Coupons edit/add screen we should be able to restrict a coupon by "Uses Per Customer" or "Uses Per Coupon". Neither of these is working, resulting in a customer being able to use a code on repeated orders, despite the Uses Per Customer being set to 1.
Needing a fix ASAP - anyone any ideas?
Installation is OpenCart 2.1.0.1
I also tested on OpenCart 2.0.3.1 and the bug happens in that install too.
Bug / Issue:
On the Coupons edit/add screen we should be able to restrict a coupon by "Uses Per Customer" or "Uses Per Coupon". Neither of these is working, resulting in a customer being able to use a code on repeated orders, despite the Uses Per Customer being set to 1.
Needing a fix ASAP - anyone any ideas?
There was a similar issue with 1.5.x where payment methods that use callbacks wouldn't work correctly with coupons. It may still be an issue with 2.1.x. See here. http://forum.opencart.com/viewtopic.php?t=65018
What payment method are you using? Do you get the same issue with Cash On Delivery payment method?
What payment method are you using? Do you get the same issue with Cash On Delivery payment method?
Thank you so much for your reply. Appreciated.
After more testing and de-bugging this afternoon I've managed to get it resolved (all via admin settings without in the end having to delve in to the code!).
To assist others in future:
I realised that the Coupons are linked with order status. Thus the coupon was only restricting if the order status was "Pending".
I started with testing it through with Cash on Delivery. I went to PAYMENT METHOD > ORDER STATUS and checked what status it showed. If set to PENDING then it will restrict coupons. Anything else and it wasn't working.
I went to SETTINGS > OPTIONS > PROCESSING ORDER STATUS. Here I ensured all were selected (perhaps all are not needed I didn't do further testing with some de-selected). As it stood previously the ones selected were those that are present in the default install of OpenCart.
This now resolved it for Cash on Delivery.
The only status that caused the Coupon not to restrict now is if the order is set to Cancelled (which is preferable anyway).
I encountered further annoyance when ensuring the same applied to PayPal as despite all my PAYPAL > ORDER STATUS being as they should my test orders (of TEST product at £0.01) were going through but defaulting the order status to Cancelled. I realised this was because they were flagged as fraud and thus gave the SETTINGS > OPTIONS > FRAUD STATUS.
You can double check your coupon usage by COUPON > EDIT > HISTORY TAB. There you can see the orders it has been applied to. If it appears there it will be restricted from further use (assuming your coupon settings themselves are all correct).
One further note:
If you edit an existing order via ORDERS > EDIT. Make sure you re-apply the coupon so correct total is showing before re-saving or the coupon gets removed from the updated order. This doesn't apply when you ORDERS > VIEW and update the order status of course, which is the more preferable and speedy method of updating order status.
After more testing and de-bugging this afternoon I've managed to get it resolved (all via admin settings without in the end having to delve in to the code!).
To assist others in future:
I realised that the Coupons are linked with order status. Thus the coupon was only restricting if the order status was "Pending".
I started with testing it through with Cash on Delivery. I went to PAYMENT METHOD > ORDER STATUS and checked what status it showed. If set to PENDING then it will restrict coupons. Anything else and it wasn't working.
I went to SETTINGS > OPTIONS > PROCESSING ORDER STATUS. Here I ensured all were selected (perhaps all are not needed I didn't do further testing with some de-selected). As it stood previously the ones selected were those that are present in the default install of OpenCart.
This now resolved it for Cash on Delivery.
The only status that caused the Coupon not to restrict now is if the order is set to Cancelled (which is preferable anyway).
I encountered further annoyance when ensuring the same applied to PayPal as despite all my PAYPAL > ORDER STATUS being as they should my test orders (of TEST product at £0.01) were going through but defaulting the order status to Cancelled. I realised this was because they were flagged as fraud and thus gave the SETTINGS > OPTIONS > FRAUD STATUS.
You can double check your coupon usage by COUPON > EDIT > HISTORY TAB. There you can see the orders it has been applied to. If it appears there it will be restricted from further use (assuming your coupon settings themselves are all correct).
One further note:
If you edit an existing order via ORDERS > EDIT. Make sure you re-apply the coupon so correct total is showing before re-saving or the coupon gets removed from the updated order. This doesn't apply when you ORDERS > VIEW and update the order status of course, which is the more preferable and speedy method of updating order status.
Has anyone had any success in getting single use coupons to work in OC 2.0 with Paypal transactions? My users are still able to use a coupon multiple times and nothing being recorded to the coupon history tab.
Any help would be appreciated.
Any help would be appreciated.
Have you set all your order statuses in the Processing Order Status option in the settings?
The help for this option reads.
The help for this option reads.
Set the order status the customer's order must reach before the order starts stock subtraction and coupon, voucher and rewards redemption.
It's a simple payment method and would maybe help highlight where the problem is.
What payment methods are you currently using? And what do you have the order statuses to in that payment method?
Also what statuses have you ticked in Processing Order Status in the settings?
A few more threads on the topic that may help.
viewtopic.php?f=190&t=159069
viewtopic.php?f=191&t=145825
viewtopic.php?f=191&t=137616
What payment methods are you currently using? And what do you have the order statuses to in that payment method?
Also what statuses have you ticked in Processing Order Status in the settings?
A few more threads on the topic that may help.
viewtopic.php?f=190&t=159069
viewtopic.php?f=191&t=145825
viewtopic.php?f=191&t=137616
I'm only using PayPal Standard as a payment system. All items for sale are downloadable files, so no other method is required, or wanted.
I've set the order statuses in Paypal standard to match their names. I.E. Pending = pending, Processed = processed, etc.
In Systems > Settings, I tried it as the earlier person mentioned and ticked all options under Processing Order Status and now the coupons work as expected in COD mode (enabled for testing) with the history updating, etc. However, it still doesn't work properly when using paypal as a payment method.
The other threads didn't give me much of an idea of anything to try either. I did see one thread somewhere that had you modify the coupon.php file and one other php file. Guess that's worth a try, unless you have any ideas...
I've set the order statuses in Paypal standard to match their names. I.E. Pending = pending, Processed = processed, etc.
In Systems > Settings, I tried it as the earlier person mentioned and ticked all options under Processing Order Status and now the coupons work as expected in COD mode (enabled for testing) with the history updating, etc. However, it still doesn't work properly when using paypal as a payment method.
The other threads didn't give me much of an idea of anything to try either. I did see one thread somewhere that had you modify the coupon.php file and one other php file. Guess that's worth a try, unless you have any ideas...
Who is online
Users browsing this forum: No registered users and 4 guests