Single use coupons in opencart
24th Apr 2015
In the admin of opencart stores you can select how many times a coupon can be used, and also how many times a user can use that coupon. I’m currently working on a site where my client would like people to be able to use an introductory coupon once – so I’ve set the coupon user per user setting to 1.
However – final tests on the site then showed that this feature in opencart doesn’t actually work! Users can use the coupon as many times as they want, and nothing stops them! This bug in opencart has been reported by other people and some kind soles have written a fix for it here. We’re using version 188.8.131.52 and their fix worked for us.
Meanwhile, this doesn’t solve all of our issues.
It seems – understandably so – that with the user-per-User option now working, it can only count uses by logged in Users. If someone uses the Guest Checkout then they can use the voucher code as many times as they like. You can choose to set your coupon to only work for logged in Users, but this means that when someone enters their voucher whilst logged out, they just see the following error – which doesn’t explain that logging in could make a difference.
If you’d like to update this warning to tell people that they need to log in you can find the error message in the file: catalog/language/english/checkout/coupon.php. You may wish to add links into this message, to direct people to login (/index.php?route=account/login) or register (/index.php?route=account/register). But of course you need to word this carefully as sometimes this error could be justified – so be sure to explain to people that logging in “may” help, but don’t promise it!
This isn’t an ideal solution as it does involve taking people away from their basket, registering or logging in, and then coming back to their basket again. But it does at least let you keep control over how many times your discount is used.
Another issue around the single use option is that opencart only lets a shopper add a voucher code whilst looking at their basket – it doesn’t give them option to add one on the check out page.
Themes generally give customers the option of viewing their basket or going straight to the checkout, and I’ve known lots of customers complain to opencart store holders that they’ve got a voucher code but don’t know where to redeem it, because they’ve gone straight to the checkout rather than via the basket page.
One way of solving this – although not a very nice way – is to remove the checkout button from the site’s header. Below is how a theme typically looks with both buttons, but if you hid the checkout button, the customer would be forced to go via their basket. Which isn’t really too much extra hassle for them.
Default option showing both buttons:
The Knowledge Base
Our knowledge base is split into categories, with an introdution to various differnt aspects of that category, followed by current topical articles which we constantly add.