Magento will by default order layered navigation options by position. To use alphabetic values first and foremost, do the following:
Override the Eav_Entity_Attribute_Source_Table model
<global> <models> <eav> <rewrite> <entity_attribute_source_table>Namespace_Module_Model_Eav_Entity_Attribute_Source_Table</entity_attribute_source_table> </rewrite> </eav> </models> </global>
PHP
Override the getAllOptions method as follows:
<?php class Namespace_Module_Model_Eav_Entity_Attribute_Source_Table extends Mage_Eav_Model_Entity_Attribute_Source_Table { public function getAllOptions($withEmpty = true, $defaultValues = false) { $storeId = $this->getAttribute()->getStoreId(); if (!is_array($this->_options)) { $this->_options = array(); } if (!is_array($this->_optionsDefault)) { $this->_optionsDefault = array(); } if (!isset($this->_options[$storeId])) { $collection = Mage::getResourceModel('eav/entity_attribute_option_collection') ->setAttributeFilter($this->getAttribute()->getId()) ->setStoreFilter($this->getAttribute()->getStoreId()); $collection->getSelect()->order(['main_table.sort_order asc', 'value asc']); $collection->load(); $this->_options[$storeId] = $collection->toOptionArray(); $this->_optionsDefault[$storeId] = $collection->toOptionArray('default_value'); } $options = ($defaultValues ? $this->_optionsDefault[$storeId] : $this->_options[$storeId]); if ($withEmpty) { array_unshift($options, array('label' => '', 'value' => '')); } return $options; } }
This uses sort order first, then uses value to order the attribute options.