3

I need to display the products marked as new in a dedicated page in my e-shop and use the same products list template I am using in the catalog_category_view page. Does Magento already provide this functionality or should I write something custom?

  • what url would i go to to see this page on my store? – Yehuda Schwartz Feb 10 '17 at 18:16
  • Dude I am also having a same problem? But is there anyway to add the "New products" to a specific category programatically? – Geek Nov 23 '17 at 7:41
2

check out Mage_Catalog_Block_Product_New. so in your layout file you need to add something like

<block type="catalog/product_new" name="products.new" template="catalog/product/list.phtml" />

There's also a template for new products, called new.phtml (replace list.phtml with new.phtml) - depends on how you want to display things

  • what is the url for this? – Yehuda Schwartz Feb 10 '17 at 18:15
  • url for what? that's a bit of xml code that needs to go somewhere in your theme – Cristi Feb 11 '17 at 17:06
  • the url for going to the new products page i want to create – Yehuda Schwartz Feb 13 '17 at 14:05
  • how should i know what your url will look like? i think you should look more into magento coding before implementing this feature... – Cristi Feb 13 '17 at 17:06
  • 1
    yeah, because there's no product collection loaded. off the top of my head I'd say put this in the content of your cms page (and remove the layout update): {{block type="catalog/product_new" template="catalog/product/list.phtml" category_id="123"}} - replace 123 with an actual category id. A better option would be to use this widget: {{widget type="catalog/product_widget_new" display_type="all_products" products_count="20" template="catalog/product/widget/new/content/new_list.phtml"}} – Cristi Feb 23 '17 at 7:36

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.