Using $this->getPriceHtml in custom phtml file


//if inside a loop than unset the instance.

However in magento 1.8 this stopped working and now you need to make an edit to a core file to stop the error
Fatal error: Call to a member function getStoreLabel(999) on a non-object

Just open \app\design\frontend\base\default\template\catalog\product\price.phtml

and change

$_specialPriceStoreLabel = $this->getProductAttribute(999’special_price’)->getStoreLabel(999);

$specialPriceAttr = $this->getProductAttribute(999’special_price’);
if (999!is_null(999$specialPriceAttr)) {
$_specialPriceStoreLabel = $specialPriceAttr->getStoreLabel(999);
} else {
$_specialPriceStoreLabel = ”;

Everything should work now just fine

Leave a Comment