EtapDesign Posted June 12, 2012 Share Posted June 12, 2012 Hey people! I've a problem with colors of my product-list. To view: http://www.shilton.fr/boutique-en-ligne-shilton/11-t-shirt Images don't display, there are "?", I believe that it's because of size links. Can you help me please, I don't understand. Thank you in advance. Link to comment Share on other sites More sharing options...
cocothecat Posted June 12, 2012 Share Posted June 12, 2012 The colours load in just fine for me Link to comment Share on other sites More sharing options...
Mike Kranzler Posted June 12, 2012 Share Posted June 12, 2012 Hi EtapDesign, When creating the different sizes and colors in the Combinations tab, did you already upload an image for each individual color option? -Mike Link to comment Share on other sites More sharing options...
EtapDesign Posted June 12, 2012 Author Share Posted June 12, 2012 Yes, in the combinations I've uploaded an image for each individual color in the back office. For example: Size : S Color : red and a product associated. In my product-list file, I have the code: <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img id="img_{$product.id_product}" src="{$link->getImageLink($product.link_rewrite, $id_product-id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /></a> <h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3> {if isset($product.colors) && $product.colors} <p class="colors"> {foreach from=$product.colors key='id_attribute' item='color'} <a onclick="document.getElementById('img_{$product.id_product}').src='{$img_prod_dir}{$product.id_product}-{$color.id_image}.jpg'" class="color_pick" title="{$color.name}" style="background: {$color.value};"></a> {/foreach} </p> {/if} I think the problem is here no? Mainly : <p class="colors"> {foreach from=$product.colors key='id_attribute' item='color'} <a onclick="document.getElementById('img_{$product.id_product}').src='{$img_prod_dir}{$product.id_product}-{$color.id_image}.jpg'" class="color_pick" title="{$color.name}" style="background: {$color.value};"></a> {/foreach} </p> Sorry to my english bad. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now