Page 1 of 1

[SOLVED]How to define the dollar value of each reward point?

Posted: Mon Jun 04, 2012 5:01 pm
by yarac
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 476 times


Re: How to define the dollar value of each reward point?

Posted: Mon Jun 04, 2012 10:42 pm
by Avvici
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);