In the listing of items in checkout/cart, I have declared the following:
Mage::helper('checkout/cart')->group_rate_shipping_info=$group_rate['shipping_info'];
to be used in another .phtml
file. This is being done in ../checkout/cart.phtml
That file then calls this->getChildHtml('totals'), which in turn calls two (+ more) .phtml
files:
/frontend/base/default/template/tax/checkout/subtotal.phtml
- it works here, the value is set and prints/frontend/mycompany/default/template/tax/checkout/grandtotal.phtml
- it doesn't work here.
I have several questions:
- Obviously first, why not? I suspect that the path to declaring Mage::helper(..) is somehow different inside
mycompany
files, but I don't know - What working class could I attach an attribute to to work in both phtml files?
- Should I use Mage:getSingleton(..) instead?
- Is there a better "Magento way" of doing this?
Obviously I want to avoid using global variables... Thanks