The following Magento 1 code no longer works with PHP 7 or later:
|
1 |
echo Mage_Catalog_Block_Product::getPriceHtml($_product, true); |
With PHP 7, you need to create an instance of Mage_Catalog_Block_Product and call getPriceHtml on that instance.
|
1 2 |
$productBlock = new Mage_Catalog_Block_Product; echo $productBlock->getPriceHtml($_product, true); |
Mage_Catalog_Block_Product::getPriceHtml causes errors with PHP 7
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.