Post by mvitor » Fri Aug 05, 2016 11:15 pm

Hi,

I am looking for the variable that holds the monetary value of the reward points during the checkout.

When you are at the shopping cart page (index.php?route=checkout/cart) and you decide to user your "Reward Points" the system calculates how much it will be, so when we proceed to checkout this value is stored when we follow to the next page (index.php?route=checkout/checkout). Right? Where?!?! I am getting crazy! :crazy:

I want to use this value on the free shipping module. If someone is using points, there is no free shipping.

Any help?

Thanks in advance...

Newbie

Posts

Joined
Wed Jan 27, 2016 2:47 am

Post by straightlight » Sat Aug 06, 2016 5:01 am

Welcome to the Opencart forum. This topic wlll be moved to the extensions support section of the forum.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by knowband.plugins » Thu Aug 11, 2016 4:05 pm

Try this

Code: Select all

echo $this->customer->getRewardPoints();

foreach ($this->cart->getProducts() as $product) {
echo $product['points'];
        }	

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by straightlight » Thu Aug 11, 2016 6:48 pm

knowband.plugins wrote:Try this

Code: Select all

echo $this->customer->getRewardPoints();

foreach ($this->cart->getProducts() as $product) {
echo $product['points'];
        }	
I do NOT suggest to use the above method on a live site. Ensure first login into the admin-end and click on your desired store beside the logout link on the top-right corner of the admin-layout to load your store. The code above should be replaced with:

Code: Select all

if (!empty($this->session->data['token'])) {
echo $this->customer->getRewardPoints();

foreach ($this->cart->getProducts() as $product) {
echo $product['points'];
        }
}
The echo command should never be used straightforward on a live site without the admin token other than what the Opencart core already delivers.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 2 guests