0

I have created is_freeshipping attribute it's a boolean (Yes/No), and it's showing while product editing in Admin Panel.

And I am getting its value successfully on the Product page, But Category page returning false (No) even though it is true(Yes).

I tried to get this value by below code.

<?php $isFreeShipping = $_product->getResource()->getAttribute('is_freeshipping')->getFrontend()->getValue($_product); ?>

Is it the correct procedure? Please suggest me how to get the value of a custom attribute in Category Page?

2

Please cross check your attribute is_freeshipping have the flag Use in product listing set to Yes. After setting the flag you need to do reindex product flat index if Flat catalog is enabled.

enter image description here

  • checking........ – Bojjaiah Jan 24 '17 at 10:31
  • Thank you. now working. is it mandatory? for showing category page? – Bojjaiah Jan 24 '17 at 10:34
  • 1
    Yes, is it required If you want to get attribute value in product listing page @magentotwo – Keyur Shah Jan 24 '17 at 10:36
  • Ok. thank you.. – Bojjaiah Jan 24 '17 at 10:40

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.