Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Wednesday 21 September 2016

How to get value from controller to phtml / view / template file in magento

You can use magento registry for set and get values

Set a value (in controller)

Mage::register('variable_name', $variable_value);

Get a value (in phtml/view/template)

$var_value = Mage::registry('variable_name');