Tuesday, August 21, 2012

Magento : Product list page wrong sorting by price

Magento : Product list page wrong sorting by price

When we install webtex_customergroupprice it has a bug when it sorts products

on product list page it is not correct. For this we need to change collections orderby.

We add

$collection->getSelect()->reset(Zend_Db_Select::ORDER)->order('(min_price)'.$orderDir);

at the end of the function public function sortByPrice() in file "app/code/local/Webtex/Customer

GroupsPrice/Model/Observer.php".

Refresh Cache and the sorting is perfect.

Enjoy!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

1 comment:

  1. Thanks for the best blog.it was very useful for me.keep sharing such ideas in the future as well.this was actually what i was looking for,and i am glad to came here!
    magento development company in bangalore 

    ReplyDelete