1

I need to use the price variable from price.phtml in a different phtml file. I have tried including price.phtml with output buffering so the echos don't display. But I was never able to print any of the variables successfully. So I do not know what I am doing wrong or if accessing the price.phtml variables is even possible.

Any ideas? Much thanks!

1 Answer 1

1

Hello you can do this by magento registry

Add below code Mage::register('some_name', $var); in price.html and then get this value in other phtml

$my_var = Mage::registry('some_name');

then unset this some_name variable use below code

Mage::unregister('some_name');
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.