Tag Archives: Magento

Magento : How to show new products in category list

In any normal e-commerce website, it is a good thing to obviously show which products are new. This way you attract attention of your regular visitors and maybe you sell more and you extend the lifetime customer value. Anyway, it is pretty normal to put these new products in front of others in the catalog, or at least to make them conspicuous.

Although Magento allows you to configure start and end dates for a product in order to show it as new, the default Magento template doesn’t show it. This is the goal of this mini-tutorial : to show you how to show new products among old ones in a category list.

In fact, this is not complicated, you only have to know how to do it. This information I’ve found on this forum (french) doesn’t seem to be well known over the internet, but giving such informations might help a lot improving the Magento Community. Anyway. I’ve summerized it, put it in a real example, and even provided it as a download for lazy developers.

First, in the product page of some product in Magento’s backend, insert starting and ending dates for its newness state. To do a test, put (of course) a date before today’s date, and a date which is later as today’s date.

The code to add to access newness dates of a product is the following :

$newToDate = Mage::getModel(‘catalog/product’)->load($_product->getID())->getNewsToDate();

// Date and time (now)
$now = date(“Y-m-d H:m:s”);

if($newFromDate < $now && $newToDate > $now) {
echo “nv”;

Variables $newFromDate and $newToDate get start and end dates of the active product during the loop. This data is only available if you did insert dates values in your product page. If you don’t see any change when you’ll reload the page, you may have not did this 🙂

The path of the file where to insert this code is named list.phtml is the following (just replace yourtheme by name of the theme you’re using, default is default one) :


To add code for « list » mode, go to line 47, after this start of loop :

For « grid » mode, go to line 93, after the same code as for « list » mode, or almost.

In both cases, you can place the code wherever you want, as soon it is within the loop. Here is what end of loops look like :

If you followed this tutorial correctly, you should see at list a product with mention « This is new! ». If it doesn’t work, you still can download the file (Magento v1.3.2.4) down this page or ask help in comments of this article!

Magento – Remove price in layer navigation

On a website that uses Magento as CMS, the price will show up (by default) in layer navigation, left column. Price layer navigation is a nice feature of Magento, but it may not always be something you need for your e-commerce. Especially if most of your products have a similar price.

Here is a mini-tutorial to know how to remove prices in layer navigation!

To get rid of the price list in the left column is really easy to do. As usual with Magento, you have to know where to go. No need to make some dirty hack in Magento’s core, you can do it from the back-end!

Go to Manage attributes page : Catalog > Attributes > Manage attributes

Click on price attribute (Price, not Price view!) which is located on the second page. If you don’t find it at all, try the Reset filter button, if you messed up with list filters on that page before.

In Properties page (it will show up by defaut), under Frontend Properties tab, select No for the field labeled Use In Layered Navigation.

That’s all, prices won’t show up again in the left column! If you don’t notice any change, just refresh the cache in Cache Management page.

If you like Magento, I would advice you to learn how to make Magento SEO friendly!

SEO for Magento

Magento is a great e-commerce CMS, with tons of incredible possibilities.

Most of time, we would prefer simplier e-commerce scripts than Magento, because Magento needs a lot of ressources to run, and it’s made for gigantic online shops, else it could be hard to take advantage of all its performance.

I’ll have many occasions to talk about Magento later on; I’m starting a e-commerce project. The goal of this article is to give a useful link. When you’re running a e-commerce, SEO is interesting you even more : here is a great Magento SEO guide, that looks not too complex. Some people say Magento is not SEO-friendly, but you can do pretty well with this article!