Post by Gui Siani » Fri Aug 19, 2011 2:57 am

i need to use the variable "taxes" from de page "confirm.tlp/php" but i can't find it... i tried to use this->data['taxes'], $taxes, $this->cart['taxes'] and more and nothing...

Someone help me please..

New member

Posts

Joined
Tue Jul 12, 2011 1:48 am

Post by Xsecrets » Fri Aug 19, 2011 3:05 am

the taxes are part of the totals array.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Gui Siani » Fri Aug 19, 2011 3:19 am

Right, but how can i use this in other file?
Exemple, in "confirm.php" i found it here:

$total_data = array();
$total = 0;
$taxes = $this->cart->getTaxes();

But when i will use this in other file, it doens't work with the way that i sayd

New member

Posts

Joined
Tue Jul 12, 2011 1:48 am

Post by Qphoria » Fri Aug 19, 2011 3:29 am

$this->cart->getTaxes(); will get you the product taxes

But if you want the taxes on shipping and anything else, then you'd need to either run that whole totals code on the page you want it.. or if it loads AFTER the confirm page, then you could try setting it to the session as cheap global variable

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Gui Siani » Fri Aug 19, 2011 3:52 am

Cool, i will try and back to talk about. Thanks!

New member

Posts

Joined
Tue Jul 12, 2011 1:48 am

Post by Gui Siani » Sat Aug 27, 2011 8:06 am

It Worked!

I used Session...

cart.php:

session_start()
$_SESSION['value'] = $result['price'];

shippingcart.php

session_start()
$value = $_SESSION['price'];

So.. Thanks Guys ;)

New member

Posts

Joined
Tue Jul 12, 2011 1:48 am
Who is online

Users browsing this forum: Bing [Bot] and 89 guests