Sanjoy Roy

[MCM, MCP, SCJP] – Senior PHP Programmer

Magento – How to Change multiselect list box to select box?


In magento, by default if a select option has more than 2 values, it automatically make the select box to multiselect box.
if you need to change this to remain always select box, here is how to do:

Steps:
Edit the Form.php:
Location: /public_html/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php
Position: public function getAttributeSelectElement($attribute)
Line no.: 185
What to change: <pre>if (is_array($options) && count($options)>2)</pre>  to <pre>if (is_array($options) && count($options)>100)</pre>

Advertisements

Comments are closed.

%d bloggers like this: