Magento News

 

magento sort attribute option collection by position?

Greetings,

I am trying to sort an array of attribute option values by their “position” as entered in the manage attributes panel. I seem to have tried everything, does anyone know how this is possible?

I thought for sure this would work:

        $_collection = Mage::getResourceModel('eav/entity_attribute_option_collection')->setStoreFilter(0)->setAttributeFilter($_productAttribute->getId())->addAttributeToSort('position')->load();

but it didn’t. Any help would be greatly appreciated!!

magento sort attribute option collection by position?

Possibly Related Posts:


 

Leave a Reply