cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with attribute in the advanced search

Problem with attribute in the advanced search

Hi!

I'm Fabrizio and I have e little problem.

 

I have created a dropdown attribute but when I go to show this attribute in the advanced research, the frontend show me a "multiselect".

 

the code that show this is:

 

<select id="marcaprodotto" class="multiselect" size="4" multiple="multiple" title="MARCA" name="marcaprodotto[]">

if I edit this code like this:

 

<select id="marcaprodotto" class="select" title="MARCA" name="marcaprodotto[]">

the fronttend show me a dropdown. the problem is that I don't know where is the file php that I must to edit and how to change it.

 

Thank you so much

 

4 REPLIES 4

Re: Problem with attribute in the advanced search

its not in a file, its in DB, earch for your attribute in admin -> cataog-> attributes -> manage attribute, and change the input type from mutiselect to dropdown. if you don't find it htere, search in eav_attribute table and change the frontend_input column value

Re: Problem with attribute in the advanced search

Hi! thank you but in admin -> cataog-> attributes -> manage attribute I have selected Dropdown. if I go to eav_attribute table, there is "select" in the frontend_input column.

 

You can see here that the frontend doesn't show me a dropdown for "MARCA": http://www.ink-toner.it/

Re: Problem with attribute in the advanced search

Ah! advanced search treat any dropdown type with more than 2 options as multiselect, you can rewrite Mage_CatalogSearch_Block_Advanced_Form, and modify getAttributeSelectElement

find where says

if (is_array($options) && count($options)>2) {

change to

if ($attribute->getBackend()->getType() == 'multiselect') {

Re: Problem with attribute in the advanced search

Thank you!!! now it's ok Smiley Happy