Post by yarac » Mon Jun 04, 2012 5:01 pm

For every $1 spent, 1 points will be credited.
Every 100 points should worth $5, so each point is worth $0.05

I've followed the instructions on this thread http://forum.opencart.com/viewtopic.php ... 9&p=218850
but I get inconsistent reward points value (see attached image). supposed to get a consistent $5 off with 100 points.

Don't know what went wrong, maybe it's because of all the rounding up in the sql query code that causes this?
Any suggestions on how to fix?

I'm using OC 1.5.2.1
pointvalue.jpg

pointvalue.jpg (78.71 KiB) Viewed 475 times

Last edited by yarac on Fri Jun 08, 2012 4:30 pm, edited 1 time in total.

New member

Posts

Joined
Thu Apr 12, 2012 12:24 pm

Post by Avvici » Mon Jun 04, 2012 10:42 pm

You need to take that number and round up.
Open model/total/reward.php and find this:

Code: Select all

$discount_total += $discount;
Make like this:

Code: Select all

$discount_total += ceil($discount);
Note, if you want to round to the nearest low/high just use round(); instead.

Code: Select all

$discount_total += round($discount);

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC
Who is online

Users browsing this forum: No registered users and 104 guests