Post by kroozing » Mon Jul 19, 2010 12:57 am

Is there a way for the coupon to discount non sale items only?
I am running 1.4.8b and my coupons work fine.
I can only image that an if statement comes in to the coupon calculation however i have no idea where to start.

Many thanks

New member

Posts

Joined
Thu Apr 29, 2010 2:01 am

Post by Qphoria » Mon Jul 19, 2010 1:31 am

Try this.

1. EDIT: system/library/cart.php

2. FIND:

Code: Select all

'price'        => ($price + $option_price), 
3. AFTER, ADD:

Code: Select all

'discount'        => $product_special_query->num_rows
4. EDIT: catalog/model/total/coupon.php

5. FIND:

Code: Select all

$coupon_total += $product['total']; 
6. REPLACE WITH:

Code: Select all

if (!$product['discount']) {
    $coupon_total += $product['total'];
}
 

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by kroozing » Mon Jul 19, 2010 1:48 am

Thanks for your reply Q, im affraid it had no effect at all.

New member

Posts

Joined
Thu Apr 29, 2010 2:01 am
Who is online

Users browsing this forum: Majestic-12 [Bot] and 31 guests