Please help me I want to see the products in Search Results order by ordered quantity means which products are more sold those products shows at first Thanks in
Magento Search Results – Sort by Ordered Quantity
catalogsearchmagento-enterprisesorting
Best Answer
One way of solving your issue is; by adding additional sort option like Relevance/Position sort option. In order for you to add a "ordered quantity" option you need to do the following:
Config.php
fromapp/code/core/Mage/Catalog/Model/Config.php
toapp/code/local/Mage/Catalog/Model/Config.php
and replace this functiongetAttributeUsedForSortByArray()
with the following code:Toolbar.php
fromapp/code/core/Mage/Catalog/Block/Product/List/Toolbar.php
toapp/code/local/Mage/Catalog/Block/Product/List/Toolbar.php
and replace this functionsetCollection()
with the following code:local.xml
under your active theme folderapp/design/frontend/your_package/your_theme/layout/local.xml
and add the following:I hope this will help you.