moraruvladut Posted April 7, 2015 Share Posted April 7, 2015 (edited) Hi, I've been trying to add colors available per product in product-list.tpl. For example, we have managed to defend each product manufacturer but I would like to display the colors available for each product. I use 1.5 version of prestashop! To add maker I used this code but it does not work for every product colors. <a href="{$link->getManufacturerLink($product.id_manufacturer)}"><img src="{$img_manu_dir}{$product.id_manufacturer}.jpg" alt="{$product.manufacturer_name|escape:'htmlall':'UTF-8'}" title="{$product.manufacturer_name|escape:'htmlall':'UTF-8'}" /></a> Thanks and sorry for my EnglishThe idea would be that: Edited April 7, 2015 by moraruvladut (see edit history) Link to comment Share on other sites More sharing options...
dskarbek Posted April 9, 2015 Share Posted April 9, 2015 Hi, Add color as atribute for product. In my theme it works. (default-theme). Best regards, Darek Link to comment Share on other sites More sharing options...
moraruvladut Posted April 14, 2015 Author Share Posted April 14, 2015 @dskarbek,can be a little more specific? Link to comment Share on other sites More sharing options...
dskarbek Posted April 15, 2015 Share Posted April 15, 2015 Hi, I used demo.prestashop.com: Best regads, Darek Link to comment Share on other sites More sharing options...
moraruvladut Posted April 15, 2015 Author Share Posted April 15, 2015 @dskarbek, can you help me with the line of code? Thanks. Link to comment Share on other sites More sharing options...
zeki893 Posted April 16, 2015 Share Posted April 16, 2015 @dskarbek, can you help me with the line of code? Thanks. Download the files from 1.6 look at the code in product-list.tpl I think it is this section {if isset($product.color_list)} <div class="color-list-container">{$product.color_list}</div> {/if} I'm not sure if $product.color_list is available in 1.5 Link to comment Share on other sites More sharing options...
moraruvladut Posted April 16, 2015 Author Share Posted April 16, 2015 @zeki893, does not display anything. Link to comment Share on other sites More sharing options...
moraruvladut Posted April 16, 2015 Author Share Posted April 16, 2015 In product.tpl i have this for colors {if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')} <img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$colors.$id_attribute.name}" width="20" height="20" /><br> {/if} but when i put this code in product-list.tpl don`t work. Link to comment Share on other sites More sharing options...
Recommended Posts