Search code examples
magentoconfigurable-product

Add text to configurable products on category page


Since I'm using Magento 1.9.1 with a custom theme, I'm not able to use the built in functionality for swatches.

Still, I would like to show that a product is available in multiple colors. This should obviously only be the case for configurable products. It only has to show the text "More colors".

It could look something like this:

<img src="blanket.png">
<span>More colors</span>
<span>€99,99</span>

I would have posted an image, but my reputation is too low :(


Solution

  • I do not know if I understand well what you need, but if you want to display the message "More Colors" on the grid of the category of products, you must edit the list file, which is in

    app / design / frontend / your-theme / yout-theme / template / catalog / product / list.phtml

    You must add something like this

          <?php 
           if ($_product->isConfigurable()) { 
           //content configurable
           echo '<span>More Colors</span>';
           } else {
           // content if not configurable
           }
           ?>
    

    Good Luck!