Post by rathina » Tue Apr 13, 2010 1:00 pm

I set up a 10% off coupon code, but it doesn't seem to be taking 10% off. The item in question is $7, but the coupon code only takes off .49 cents.

I even tried using the 2222 coupon code (just changed the dates), it still is only taking off .49 cents.

How do I set it up so that it takes 10% off, because for a $7 item, it should be taking $.70 off.

Newbie

Posts

Joined
Wed Jun 17, 2009 6:41 am

Post by rathina » Wed Apr 14, 2010 12:48 am

The newest, and after playing with it more this is what I have found out.

It does not matter the quantity of items are in the cart. If the cart total is above $10.00, then the 10% discount is applied correctly.

If the total of the cart is below $10, then the 10% discount is not applied. Instead my discount amount shows the multiple of what the total amount is. For example:

$5 total, discount is .25 cents
$6 total, discount is .36 cents
$7 total, discount is .49 cents
$8 total, discount is .64 cents.

As you can see, some how when it is below $10, the formula is like ( Total = $ x .$ )
When its above $10, then the 10% discount code works as intended.

Newbie

Posts

Joined
Wed Jun 17, 2009 6:41 am

Post by Qphoria » Wed Apr 14, 2010 1:30 am

Try this:

1. EDIT: catalog/model/total/coupon.php

2. FIND:

Code: Select all

$coupon['discount'] = min($coupon['discount'], $coupon_total);
3. REPLACE WITH:

Code: Select all

if ($coupon['type'] == 'F') {
	$coupon['discount'] = min($coupon['discount'], $coupon_total);
}
I think I overlooked the fact that it could be a %

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by i2Paq » Wed Apr 14, 2010 1:32 am

Thanks!

Reported as a Bug Post any OpenCart 1.4.7 Bugs here!.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Joxe » Wed Oct 06, 2010 2:55 am

I edited the php file, today, as mentioned but, 1st of all, the discount is not taken accurately. For example I have a product wich price is 6.99 and the discount shows me 0.70 when it should be 0.69, right?

Secondly, if I have more than one product in the cart (only tried with 2 product), the discount is only over the 1st product,ie, I get:

product 1: 6,99
product 2: 12,80
Discount (-10%): 0,70

Any help? :-\

v. 1.4.9.6 & v. 2.0.2.0


Active Member

Posts

Joined
Wed Apr 28, 2010 6:12 am

Post by junmoses » Thu Oct 14, 2010 12:58 am

That is a good formula for doing a coupon code. That could make it all the items gives 10 percent discount. It is only for the below 10 dollars items.

seo services


Newbie

Posts

Joined
Wed Oct 13, 2010 10:23 pm
Who is online

Users browsing this forum: No registered users and 22 guests