Public Member Functions | |
getAllOptions () | |
Protected Member Functions | |
_getCatalogConfig () |
Definition at line 35 of file Sortby.php.
_getCatalogConfig | ( | ) | [protected] |
Retrieve Catalog Config Singleton
Definition at line 43 of file Sortby.php.
00043 { 00044 return Mage::getSingleton('catalog/config'); 00045 }
getAllOptions | ( | ) |
Retrieve All options
Implements Mage_Eav_Model_Entity_Attribute_Source_Interface.
Definition at line 52 of file Sortby.php.
00053 { 00054 if (is_null($this->_options)) { 00055 $this->_options = array(array( 00056 'label' => Mage::helper('catalog')->__('Best Value'), 00057 'value' => 'position' 00058 )); 00059 foreach ($this->_getCatalogConfig()->getAttributesUsedForSortBy() as $attribute) { 00060 $this->_options[] = array( 00061 'label' => Mage::helper('catalog')->__($attribute['frontend_label']), 00062 'value' => $attribute['attribute_code'] 00063 ); 00064 } 00065 } 00066 return $this->_options; 00067 }