TAG | sort
Jun/09
29
How to sort/show products by sold quantity in Magento
6 Comments · Posted by leo in development, magento
Toolbar.php file location:
app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php
Your _construct() function should be modified to look something like:
1 2 3 4 5 6 7 | $this->_availableOrder = array( ‘position’ => $this->__(’Best Value’), ‘name’ => $this->__(’Name’), ‘price’ => $this->__(’Price’), ’special_price’ =>$this->__(’Special Price’), ‘ordered_qty’ => $this->__(’Quantity soled’), ); |
Next we open the list.phtml inside /template/catalog/product/ folder. And you need to find the:
1 | $_productCollection=$this->getLoadedProductCollection(); |
