Skip to main content

You need to do some coding, if you can then following code work for you.

Now let ‘s copy app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php:

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

to app/code/local/Mage/Catalog/Block/Product/List/Toolbar.php :

app/code/local/Mage/Catalog/Block/Product/List/Toolbar.php

(create a new directory if it is not existscreate a new directory if it is not exists).

Open new file and look at these lines of code in around line 232:

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

Now, replace with these lines:

if ($this->getCurrentOrder()) {
    if(($this->getCurrentOrder())=='position'){
        $this->_collection->setOrder('entity_id','desc');
    }
    else {
        $this->_collection->setOrder($this->getCurrentOrder(),$this->getCurrentDirection());
    }
}

That ‘s all, now remember to clear all cache and reindex too see the magic.

For more see here.

You need to do some coding, if you can then following code work for you.

Now let ‘s copy app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php to app/code/local/Mage/Catalog/Block/Product/List/Toolbar.php (create a new directory if it is not exists).

Open new file and look at these lines of code in around line 232

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

Now, replace with these lines

if ($this->getCurrentOrder()) {
if(($this->getCurrentOrder())=='position'){
$this->_collection->setOrder('entity_id','desc');
}
else {
$this->_collection->setOrder($this->getCurrentOrder(),$this->getCurrentDirection());
}
}

That ‘s all, now remember to clear all cache and reindex too see the magic.

For more see here.

You need to do some coding, if you can then following code work for you.

Now let ‘s copy:

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

to:

app/code/local/Mage/Catalog/Block/Product/List/Toolbar.php

(create a new directory if it is not exists).

Open new file and look at these lines of code in around line 232:

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

Now, replace with these lines:

if ($this->getCurrentOrder()) {
    if(($this->getCurrentOrder())=='position'){
        $this->_collection->setOrder('entity_id','desc');
    }
    else {
        $this->_collection->setOrder($this->getCurrentOrder(),$this->getCurrentDirection());
    }
}

That ‘s all, now remember to clear all cache and reindex too see the magic.

For more see here.

Source Link
Arunendra
  • 7.5k
  • 3
  • 29
  • 55

You need to do some coding, if you can then following code work for you.

Now let ‘s copy app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php to app/code/local/Mage/Catalog/Block/Product/List/Toolbar.php (create a new directory if it is not exists).

Open new file and look at these lines of code in around line 232

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

Now, replace with these lines

if ($this->getCurrentOrder()) {
if(($this->getCurrentOrder())=='position'){
$this->_collection->setOrder('entity_id','desc');
}
else {
$this->_collection->setOrder($this->getCurrentOrder(),$this->getCurrentDirection());
}
}

That ‘s all, now remember to clear all cache and reindex too see the magic.

For more see here.