Magento Forum

   
The Layered navigation
 
Gregory Tonon
Member
 
Avatar
Total Posts:  65
Joined:  2008-03-27
Toulouse
 

Hello,

I’m working on the layered navigation.

I’m trying to filter a multiple select-attribute beacause i want to display only the options values wich order is beetwen random numbers ( like 0 to 10 (my multiple-select attribute have more than 100 available options)).

How i can do this ?

Thank You

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gregory Tonon
Member
 
Avatar
Total Posts:  65
Joined:  2008-03-27
Toulouse
 

Hey

I just have found a way to do this.

I modify the catalog.xml in order to user a block method named selectByOrder :

<block type="catalog/layer_filter_attribute" name="catalog.layered.attribute">
                <
action method="selectByOrder"><start>100</start><stop>101</stop></action>
     </
block>

Then in the Mage_Catalog_Block_Layer_Filter_Attribute i add this same method, the code is

public function selectByOrder($start=null,$stop=null)
    
{
        Mage
::getSingleton$this->_filterModelName )
            ->
setStartOrder($start)
            ->
setStopOrder($stop);
        return 
$this;
    
}

Now i’m stopped because i don’t know how to retrieve $start and $stop values in Mage_Eav_Model_Entity_Attribute_Source_Table->getAllOptions() to get the options which sort_order is between the start and stop defined in the catalog.xml

Have you any ideas ? I’m in the right way ?
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top