Post by tania_argent » Sat Mar 26, 2022 5:32 pm

Hi!
I selected some products on coupon to have a discount. When someone try to use the coupon on other products doesn’t work, but if any of the products on coupon in on the cart, the discount is applied to all products and not just the select products on coupon.

Newbie

Posts

Joined
Fri Oct 08, 2021 10:37 pm

Post by Johnathan » Sat Mar 26, 2022 9:44 pm

Super Coupons can do this. It allows you to set all sorts of different rules on coupons, so you can restrict them to individual products, categories, or manufacturers. It works separately from the normal coupon system, so you can use both at the same time if you want.

Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any questions.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by WesMahlum » Fri Apr 22, 2022 1:33 pm

Following on answer... In catalog/model/total/coupon.php I swapped out

Code: Select all

// If discount greater than total
if ($discount_total > $total) {
    $discount_total = $total;
}
For:

Code: Select all

// If discount greater than total
if ($coupon_info['type'] == 'F' && $discount_total > $subtotal) {
    $discount_total = $subtotal;
}
Hope no one else ever has to debug this one!!!

Newbie

Posts

Joined
Mon Apr 18, 2022 3:13 pm

Post by ADD Creative » Sat Apr 23, 2022 7:26 am

Probably this. https://github.com/opencart/opencart/pull/5062

Using $subtotal could cause problems if the coupon has Free Shipping.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 5 guests