I'm getting so mad that it literally hurts with a problem related to attribute option collection on Magento 1.8.1
I have a dropdown type attribute populated with dozens of values and frequently updated with new values, wich is used for layered navigation purposes.
What im trying to do is actually change de default behaviour and sort NUMERICALLY all theese options if "position" is not set.
Magento sorts my values like this (alphabetically)
I need to sort them this way
I tried to edit class Mage_Eav_Model_Resource_Entity_Attribute_Option_Collection in any way. Maybe i'm pretty close adding in public function setStoreFilter
$this->getSelect()->reset(Zend_Db_Select::ORDER); $this->getSelect()->order(new Zend_Db_Expr("CAST('value' AS SIGNED) ASC"));
Hope someone can help me understand how to achieve this.