I added product sku on to Product list page. Using below code:

<?php echo $_helper->productAttribute($_product, $_product->getSku() , 'sku'); ?>

It was showing the sku like I wanted. But suddenly it disappeared. I checked the code, its there. But it is not showing up on frontend. then I tried

<?php echo $_helper->productAttribute($_product, $_product->getData('sku') , 'sku'); ?>

also didn't work.

  • 1
    Just a note, in your second snippet it should be getData and not getDate. Do a var_dump($_product->getSku()) to see if you get a value. It wouldn't just disappear. Jun 14 '16 at 15:12
  • var_dump dumping Null. Same website I have mirror copy that one showing properly.
    – maniramav
    Jun 14 '16 at 15:30
  • Go to System > Index Management and refresh your indexes. Especially Product Attributes and Product Flat Data Jun 14 '16 at 15:44

By going, System > Configuration > Catalog > FrontEnd and select "No" to "Use Flat Catalog Product" solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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