grindking
grindking

Reputation: 937

Sort by newest products (default) - Magento?

How can I sort the products by newest in Magento? Do I have to modify my catalog.xml or are there any extensions available?

Upvotes: 0

Views: 11699

Answers (3)

AnkitK
AnkitK

Reputation: 418

Here is an extension which enabled Sort by news_from_date and news_to_date along with created_at field.
This extension will prioritize the new products settled by admin and then lists the product which were added lately.
The Magento sort by new products extension URL is - http://www.magentocommerce.com/magento-connect/sort-by-new-products-and-popular-products.html


For Magento 2 here is an extension - http://www.magento2plugins.com/sort-by-new-popular-ratings-extension-for-magento2.html

Upvotes: 0

HughieW
HughieW

Reputation: 149

In the Magento Admin interface, go into System -> Configuration, then choose Catalog from the left menu, then open the "Frontend" section. One of the options on there is "Product Sort By" - you should be able to chose "New?" from the list.

This will set the default sorting order :)

Upvotes: 1

Sturm
Sturm

Reputation: 4285

You can get a product collection sorted by date using:

$_newest_productCollection = Mage::getResourceModel('reports/product_collection')
  ->addAttributeToSelect('*')
  ->addAttributeToFilter('visibility', $visibility)
  ->setOrder('created_at', 'desc')
$_newest_productCollection->load();

Or yes, there are extensions available. http://amasty.com/improved-sorting.html for instance.

Upvotes: 4

Related Questions