I have a task to tune the product view in the catalog listing - to place something like a discount banner (image) next to products that have discounts .
I thought to use Catalogs for this and to define discount catalogs and attach a picture to this catalog (each catalog has a picture that you can set through Admin, this image will be the banner that will be shown near the product).
So, in the design\frontend\default\default\template\catalog\product\list.phtml
i have to get the image path and place it into the html. To get the image path, i have to find the discount Catalog for this particular product. (catalog that is used for discounts follows a naming convention like discount_ + catalog name ex: discount_Spring)
I think i should extend Mage_Catalog_Block_Product_List and add a static function for finding the discount banner image name (this function would check all categories that start with discount_ and pick up the first and return this category’s image path, from the catalog’s attributes, don’t know yet the name of the image path attribute)
on the other hand, this function could be linked to the Product class (Mage_Catalog_Model_Product).
What do you think?