I have a dropdown attribute with many options.
In cart.phtml
I already get the attribute value for each item
Mage::getModel('catalog/product')->load($_item->getProduct()->getId())->getMyAttribute();
In addition to that I want to get the option position.
How can I do that without loading all Attribute options.
Best Answer
Assuming you have
$optionId
( that's the value you get when calling$product->getData('your_attribute')
), you can get the position (sort_order
) this wayThis will return a simple object, something like...
Check Mage_Eav_Model_Resource_Entity_Attribute_Option_Collection for more details