I have created a Custom Attribute ( attribute id: custom_attribute ) for the category. It shows up in the backend and able to save the value to it. I just wanted to print the value in the Category view.phtml template.

I have tried the following to make this happen. But none of them seems to be working for me.

  • Reindexed
  • Flushed cache

Functions I have tried to get the value.

  • <?php if($_customAttribute = $this->getCurrentCategory()->getCustomAttribute('custom_attribute')): ?> <?php echo $_helper->categoryAttribute($_category, $_customAttribute, 'custom_attribute') ?> <?php else: ?> Output: Condition false

  • Mage::getModel('catalog/category')->load($_category->getId())->getData('custom_attribute') Output: Null

  • Mage::getResourceModel('catalog/category')->getAttributeRawValue($_category->getId(), "name", Mage::app()->getStore()->getId()); Output: bool(false)

I have used silksoftware to create a custom attribute


Your Answer

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

Browse other questions tagged or ask your own question.