1

The product view page is blank on some products within my Magento store. I have the following error in the log:

[05-Oct-2015 21:18:34 UTC] PHP Fatal error: `Call to a member function productAttribute() on a non-object in /home/mysite/public_html/app/design/frontend/mytheme/default/template/catalog/product/view.phtml on line 69`

The piece of code to which this refers is as follows:

<?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>

Can anyone please assist with this issue?

All products on the site are imported via database. As far as I can see the only difference with the products that appear blank is that there's no 'short description' content. I've added content to the short description as a test but that didn't seem to fix the issue. Short description is identified as a required field.

1
  • I am getting the same issue, how can I find what is the issue? There is no console error and log error even view page source also empty.
    – Gem
    Commented Jul 10, 2018 at 11:25

1 Answer 1

1

May be helper class is not called here.

So you need to call helper class .please add below code before your code

<?php $_helper = Mage::helper('catalog/output'); ?>
4
  • "Product view is blank on certain products" not for all product. if that line is not present all page goes blank Commented Oct 7, 2015 at 12:51
  • So <?php $_helper = Mage::helper('catalog/output'); ?> <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?> Amit? Commented Oct 7, 2015 at 12:52
  • yes.. you have going to right direction
    – Amit Bera
    Commented Oct 7, 2015 at 12:54
  • @AmitBera which file i need to add the above code?
    – Gem
    Commented Jul 10, 2018 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.