6

There is 'Default Product Listing Sort By' on every category

I setup ' Use Config Settings' for all categories and the config settings 'Product Listing Sort by' is 'Best Value'

I want to always products sort and show as 'Position'. but How can I make sort default option as 'Position?

enter image description here

enter image description here

  • John,Best value actually the position(Position) field in magento is showing as Best value. – Amit Bera Mar 25 '15 at 4:38
  • @AmitBera Yeah I guess that too but I always find our sort option is 'Name' ..It seems someone change Sort option 'Name' and it's saved default or 'Name' become default. How can I force always 'Position' as default? – Moon Mar 25 '15 at 5:12
3

I think you could either do it for each category or you could do it here as seen in the screenshot below

UPDATE Otherwise try this

In the toolbar block there is a method called disableParamsMemorizing. This should disable the storing of parameters in session. Try to add this in the toolbar block.

<action method="disableParamsMemorizing" />

or you can override the Mage_Catalog_Block_Product_List class and make the getToolbarBlock method look like this:

public function getToolbarBlock()
{
    if ($blockName = $this->getToolbarBlockName()) {
        if ($block = $this->getLayout()->getBlock($blockName)) {
            $block->disableParamsMemorizing();
            return $block;
        }
    }
    $block = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());
    $block->disableParamsMemorizing();
    return $block;
} 

Check this one here

  • As I upload picture, I already setup exactly same like your picture 'Best Value' Check Use Default but I still find my sort option is 'Name' on category – Moon Mar 25 '15 at 8:38
  • 1
    Take a look at this stackoverflow.com/questions/17705344/… and this one here magento.stackexchange.com/questions/7363/… – Klettseb Mar 25 '15 at 8:43
  • John if something worked for you then let us know – Klettseb Mar 25 '15 at 13:07
  • Thanks! Yeah I'm checking the link and will let you know – Moon Mar 25 '15 at 13:08
  • @JohnG. If you're still around, don't forget to mark this question as accepted if it solved the problem for you! – Tim Malone Feb 21 '17 at 4:35
0

To change magento product list default sorting feature, you need to change 2 things

1) Select default selector from admin panel

Go to System->Configuration->Catalog->Frontend
select from 'Product Listing Sort by'

By this way you will select default attribute for sorting

2) To change default order, make change in following file

app\code\core\Mage\Catalog\Block\Product\List\Toolbar.php

Search

protected $_direction           = 'asc';

change to

protected $_direction           = 'desc';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.