News

Showing last inserted products first

Copy the file from :

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

Paste to :

Path: app\code\local\Mage\Catalog\Block\Product\List\Toolbar.php

[ Create folders if not available ]

 

in above file find bellow code 

 

if ($this->getCurrentOrder())

{

$this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());

}

 

And Replace with bellow code.

 

if ($this->getCurrentOrder())

{

if(($this->getCurrentOrder())=='position')

{

$this->_collection->setOrder('entity_id','desc');

}

else

{

$this->_collection->setOrder($this->getCurrentOrder(),$this->getCurrentDirection());

}

 

}

Contact Us