One of my recent articles was on the subject of sorting “On Sale” product in Magento. The following is a cleaner and more advanced look at how—with few tricks and smart moves—you can reuse existing Magento code and modify it to suit your needs.
Product can be “on sale” in two ways:
1. when an item has a special price assigned to it on the individual level, or
2. when a special promotion “covers” the item
It is important to remember that you don’t have to set up the special price on each product to get it to be on sale; you can simply create a promotion rule and say something like “Set all the products in Category X to be on sale.”
I provided few screenshots at the bottom of this article to provide a closer look at what I’m talking about. I will not go into too much details here since this is a bit more advanced HOW TO, but here is the process in a nutshell:
First, create a copy of /catalog/product/list.phtml file and name it onsale_list.phtml. Here is my version of onsale_list.phtml file.
Second, “activate” this new file. There are few ways you can do this. Let’s say you wish to assign this onsale_list.phtml on one of our categories, named “On Sale,” for instance.