Post by Pushkom » Thu May 26, 2016 4:23 pm

Hi guys,

We have problem with reward points discount. Everything seems to be set the right way (extension is enabled, products give points and customers can buy them with points). On the cart page everything is normal (customer can enter the amount of points he want). When customer enter the points and click "Apply Points" button he gets the success message (Your reward points has been applied). But thats not true... the discount has not been applied to the total sum (you can see the attachment) We've upgraded opencart version from 1.4.x to 2.1.0.2. As you may know thats causing a lot of problems. We believe the problem is in the database. We've got test store on the same server (clean installation with the same theme) and there everything is fine.

This problem is only with the reward points. Coupons discount is working.

We could use some help ! Thank you !

Newbie

Posts

Joined
Thu May 26, 2016 3:59 pm

Post by Pushkom » Fri May 27, 2016 4:28 pm

Update: in catalog/model/review.php I've tried to skipp all the calculations (in that way i believe opencart wont use any db table for reward points) and
replaced: line 49: $total -= $discount_total;
with: $total -= 5;

Still the same result... I'm really confused..

Newbie

Posts

Joined
Thu May 26, 2016 3:59 pm

Post by Pushkom » Mon May 30, 2016 3:52 pm

Update 2: Now I am sure that the problem is in the database. I've forced my test store to use the actual database (the one that was upgraded) and that caused the same problem. I still have no solution though...

Newbie

Posts

Joined
Thu May 26, 2016 3:59 pm

Post by artcore » Mon May 30, 2016 4:06 pm

Did you install the order totals module: rewards in admin>extensions>order totals?

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by Pushkom » Mon May 30, 2016 4:18 pm

Yes I did..

Newbie

Posts

Joined
Thu May 26, 2016 3:59 pm

Post by Pushkom » Mon May 30, 2016 10:59 pm

Solution: In catalog/model/total/reward.php I changed line 4:

if ($this->config->get('credit_status') && isset($this->session->data['reward']))

to:

if (isset($this->session->data['reward']))

And it's working...

The Store Credit module is disabled. I'm not sure but I think that first condition in the if statement is connected to the store credit module..

Can anybody explain this to me ? :)

Newbie

Posts

Joined
Thu May 26, 2016 3:59 pm

Post by gogoweb » Thu Mar 16, 2017 11:09 pm

This is control for the Store Credit module - it has nothing to do with rewards.
Change it to reward_status and you will have it right.
Replace this:

Code: Select all

		if ($this->config->get('credit_status') && isset($this->session->data['reward'])) {
with this:

Code: Select all

		if ($this->config->get('reward_status') && isset($this->session->data['reward'])) {

All mods | OpenCart Bulk Related Products Ultimate Edition |GeoIP hide Prices / no add to cart by country| CSS override | Direct link to checkout / skip add to cart / buy now link | AUTO pilot - reward & purchase points


New member

Posts

Joined
Sat Oct 18, 2014 6:45 pm

Who is online

Users browsing this forum: No registered users and 7 guests