0
votes

I needed to add a custom attribute to categories on Magento, I have been able to do so using:

http://www.atwix.com/magento/add-category-attribute/

But now, I will like to turn the custom attribute into a select box and load the options from a external database/module. Is there any way to specificy the options available for the custom attribute in order to make them dinamic?

Thanks.

1

1 Answers

0
votes

Have you found the solution? I'm doing it in phtml file like this

<?php $categories = Mage::getModel('catalog/category')->getCollection()->addAttributeToSelect('*'); ?>

<?php foreach ($categories as $category): ?>
   <?php $customAtt= $category->getCustom_att(); ?>
   <?php print_r ($customAtt); ?>
<?php endforeach; ?>

That way will populate all your custom category attribute values. Change the getCustom_att() with your custom attribute.

To make it a select option list, read this https://magento.stackexchange.com/questions/8674/how-to-get-all-custom-category-attribute-values/8692#8692