Magento 1.9 - CMS page products list error
-
23-03-2021 - |
Question
Display Bestsellers for Specific Magento Categories in CMS page.
Following tutorial,
https://mercytapscott.com/display-bestsellers-for-specific-magento-categories/
Added following line into cms content
{{block type="catalog/product_bestseller" template="catalog/product/bestseller.phtml" category_id="5"}}
Getting error.
My code :
app/code/local/Mage/Catalog/Block/Product/Bestseller.php app/design/frontend/default/theme/template/catalog/product/bestseller.phtml
If any configuration error or anything else?
error message :
Fatal error: Call to a member function productAttribute() on null in /home/abc/public_html/app/design/frontend/default/theme/template/catalog/product/bestseller.phtml on line 6
Solution
open below file and declare of helper after flush and check it.
app/design/frontend/default/theme/template/catalog/product/bestseller.phtml
$_helper = Mage::helper('catalog/output');