Page 1 of 1

How to set max reward points in 3.0.2

Posted: Sun Jun 17, 2018 9:45 am
by ohmashoes
Set a max points allowed in opencart ver 3.0.2

I did some work but here it is...I hope I am able to help someone out.

To change the max reward points in ver 3.0.2:

1. Go to catalog/controller/extension/total/reward.php
2. Look for:

if ($this->request->post['reward'] > $points_total) {
$json['error'] = sprintf($this->language->get('error_maximum'), $points_total);
3. Add this right below it (I use 50 points as the max on my site but you can change to your choice of max points):

if ($this->request->post['reward'] > 50) {
$json['error'] = sprintf($this->language->get('error_maximum'));

4. Save the file.
5. Then go to catalog/language/en-gb/extension/total/reward.php
6. Add this in the (error section) below. Again remember to change the 50 to your choice of max points:

$_['error_maximum'] = 'Warning: The maximum number of points that can be applied is 50!';

7. Save it and upload.
8. Test it and voila!

I really hope this helps somebody out because it took me a looong while to figure this out, especially since I am not a developer pasae.

Re: How to set max reward points in 3.0.2

Posted: Thu Jun 21, 2018 6:47 am
by Scott2018s
Thank you dude for sharing the problem and how fix it 👍