Based on this topic: viewtopic.php?f=20&t=28728#p141711
I am using opencart 3.0.3.3 and journal 3.1.8
and facing the same issue, I want to Remove the coupon that has been applied to the cart.
Please help with this, what changes need to do in the code?
Hi kanchan1995,
This extension from the Marketplace, while not compatible with your version, could give you some ideas on how to implement such functionality. But you might find that your choice of theme makes this a lot more difficult...
But if you can't find an extension, can't implement this feature yourself, and don't want to commission a developer to do this for you, here's a workaround that should work with your theme as well:
Gergely
This extension from the Marketplace, while not compatible with your version, could give you some ideas on how to implement such functionality. But you might find that your choice of theme makes this a lot more difficult...
But if you can't find an extension, can't implement this feature yourself, and don't want to commission a developer to do this for you, here's a workaround that should work with your theme as well:
- Create a new coupon called "Remove Coupons", and code "NOCOUPON" (or whatever you prefer that carries a similar semantic load...)
- Set it up as such (as on the picture):
Type: Percentage
Discount: 0
Total Amount: 0
Customer Login: No
Free Shipping: No
Products: N/A
Category: N/A
Date Start: Today
Date End: N/A (or far in the future if for some reason your setup couldn'tvalidate the date)
Uses Per Coupon: N/A
Uses Per Customer: N/A
Status: Enabled - Modify your Success, coupon applied! message by adding: "Use coupon code: NOCOUPON to remove applied coupons!" in the Language Editor (api/coupon -> text_success)
Gergely
Attachments
Remove_Coupons.PNG (53.34 KiB) Viewed 993 times
You can actually remove a coupon by just submitting a blank coupon value. It will give an error message, but the coupon in the session data *will* be removed. This works in all OpenCart 2.x and 3.0 versions that I know of.
My Super Coupons and Ultimate Coupons extensions also fix this and allow you to set a custom message when they are removed, if you need that feature. They might be overkill if you don't need the rest of their functionality, though.
My Super Coupons and Ultimate Coupons extensions also fix this and allow you to set a custom message when they are removed, if you need that feature. They might be overkill if you don't need the rest of their functionality, though.
Good little tip here!
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Who is online
Users browsing this forum: paulfeakins and 409 guests