0

I want to add a page to my Magento site which displays the 100 most recently added products sorted by date added. I want this page to appear like a normal category page with pagination and layered navigation.

I was wondering if this is possible in Magento as I've read that layered navigation needs to work on one specific category, whereas I need it to work across multiple.

Ideally I would like a solution which adds layered navigation to any product collection as I would like to create a few different pages with different lists of products that will all need the layered navigation added. Thanks

4
  • Yes it is possible but You want categories and product attributes in layer navigation?
    – Abdul
    Nov 20, 2015 at 9:36
  • 1
    You can use my Dynamic Category Products extension. It can do this easy, and lots lots more. magentocommerce.com/magento-connect/…
    – ProxiBlue
    Nov 20, 2015 at 9:50
  • Set Product as New from Date & Set Product as New to Date two product attributes available in admin. Have you filter this attributes base or filter created date?
    – Abdul
    Nov 20, 2015 at 9:57
  • Try this way : dnawebagency.com/…
    – Abdul
    Nov 20, 2015 at 10:01

2 Answers 2

1

Your choices are:

  1. Write a block that queries for those products, write a template that copies the category layout. This is the worst choice
  2. Realise that you want a category that contains the 100 most recently added products and then
    1. Write a cron job to update the contents of that category with the latest products. It's a great learning experience if you want it, but personally when I do this I commit the crime of writing an sql script to do it instead. This is an ok choice, the sql script is bad advice though
    2. Realise that time is money, and unless you particularly want the learning experience give @ProxieBlue his $99 for an extension that does what you want and more, written by someone who has a fair bit of rep and hasn't just come here to shill his extension. This is the wise choice
-1

You can get 100 products with this below code:

 $_productCollection = Mage::getModel('catalog/product')
                         ->getCollection()
                         ->addAttributeToSelect('*')
                         ->addAttributeToFilter('status','1')
                         ->setOrder('entity_id','desc');
$_productCollection->setPageSize('100');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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