Sanjoy Roy

[MCM, MCP, SCJP] – Senior PHP Programmer

Magento – How to order the fields in catalog advance search page.


Steps:
1. Alter the table:`eav_attribute`, use the following command:
ALTER TABLE `eav_attribute` ADD `sort_by` INT( 4 ) NOT NULL DEFAULT ‘500’
2. Edit the /public_html/app/code/core/Mage/CatalogSearch/Model/Advanced.php file:
Function Name: public function getAttributes()
Line no. #98
Change: ->setOrder(‘main_table.attribute_id’, ‘asc’) by ->setOrder(‘main_table.sort_by’, ‘asc’)
3. Done. Reload the ..index.php/catalogsearch/advanced/ page.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: