$_helper = $this->helper('catalog/output');
i received this error on browser when I run the code.
Using $this when not in object context in
What should i do for this .
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
you should have this:
require_once('app/Mage.php'); $app = Mage::app(); Mage::helper('catalog/output');
Basically the $this->helper is calling the function that is contained inside the current template's block class. The Mage::helper is calling the function in the "God" class.
The $this->helper normally calls a function in the class Mage_Core_Block_Abstract which checks the layout for a helper and then simply calls the normal Mage::helper if it cannot find one.