Page 1 of 1
I can't find a variable
Posted: Fri Aug 19, 2011 2:57 am
by Gui Siani
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..
Re: I can't find a variable
Posted: Fri Aug 19, 2011 3:05 am
by Xsecrets
the taxes are part of the totals array.
Re: I can't find a variable
Posted: Fri Aug 19, 2011 3:19 am
by Gui Siani
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
Re: I can't find a variable
Posted: Fri Aug 19, 2011 3:29 am
by Qphoria
$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
Re: I can't find a variable
Posted: Fri Aug 19, 2011 3:52 am
by Gui Siani
Cool, i will try and back to talk about. Thanks!
Re: I can't find a variable
Posted: Sat Aug 27, 2011 8:06 am
by Gui Siani
It Worked!
I used Session...
cart.php:
session_start()
$_SESSION['value'] = $result['price'];
shippingcart.php
session_start()
$value = $_SESSION['price'];
So.. Thanks Guys
