Magento - using $this->getPriceHtml on custom page template

后端 未结 4 860
天命终不由人
天命终不由人 2021-02-02 14:02

I have a scroller showing a collection of products currently on sale, which I call using the following:

$todayDate  = Mage::app()->getLocale()->date()->         


        
4条回答
  •  天命终不由人
    2021-02-02 14:58

    The issue is that getPriceHtml() function is defined in the Mage_Catalog_Block_Product block, rather than the standard Mage_Core_Block_Template. You need to ensure that your block extends the Product block, or you can achieve that in your layout by something like:

    
    

    I haven't tested that, but it should work.

提交回复
热议问题