VitruvianMan Posted August 3, 2015 Share Posted August 3, 2015 Hi everyone, I am almost done with upgrading my Prestashop from 1.5 to 1.6.1, everything was ok, I have just one frustrated problem: On product page there are just blank squares instead of colors (product colors variations). Check e.g. this product page: http://goo.gl/fy70pc See attached files, there are all screens from product and back office. I have tried everything, read the forum and similar topics, but nothing helped. Please, advise. Thanks a lot! Link to comment Share on other sites More sharing options...
razaro Posted August 3, 2015 Share Posted August 3, 2015 Hi you probably have theme compatible with 1.5, but check product.tpl section where color is mentioned. Here is code from default theme from 1.6 https://github.com/PrestaShop/PrestaShop/blob/develop/themes/default-bootstrap/product.tpl#L356 Link to comment Share on other sites More sharing options...
VitruvianMan Posted August 4, 2015 Author Share Posted August 4, 2015 No, theme is compatible with 1.6.0.14 and I have 1.6.1. Link to comment Share on other sites More sharing options...
razaro Posted August 4, 2015 Share Posted August 4, 2015 Ok, then could you post code from product.tpl, part from {elseif ($group.group_type == 'color')} to {elseif ($group.group_type == 'radio')} as you can see that inline style where background is set is missing and you do not use texture. Link to comment Share on other sites More sharing options...
VitruvianMan Posted August 6, 2015 Author Share Posted August 6, 2015 thank you, here is the code from themes/mytheme/product.tpl: {elseif ($group.group_type == 'color')} <ul id="color_to_pick_list" class="clearfix"> {assign var="default_colorpicker" value=""} {foreach from=$group.attributes key=id_attribute item=group_attribute} {assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')} <li{if $group.default == $id_attribute} class="selected"{/if}> <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" name="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}"{if !$img_color_exists && isset($colors.$id_attribute.value) && $colors.$id_attribute.value} style="background:{$colors.$id_attribute.value|escape:'html':'UTF-8'};"{/if} title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}"> {if $img_color_exists} <img src="{$img_col_dir}{$id_attribute|intval}.jpg" alt="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" width="20" height="20" /> {/if} </a> </li> {if ($group.default == $id_attribute)} {$default_colorpicker = $id_attribute} {/if} {/foreach} </ul> <input type="hidden" class="color_pick_hidden" name="{$groupName|escape:'html':'UTF-8'}" value="{$default_colorpicker|intval}" /> Link to comment Share on other sites More sharing options...
VitruvianMan Posted August 10, 2015 Author Share Posted August 10, 2015 Any idea, friends? Thanks Link to comment Share on other sites More sharing options...
VitruvianMan Posted August 15, 2015 Author Share Posted August 15, 2015 still not resolved Link to comment Share on other sites More sharing options...
razaro Posted August 15, 2015 Share Posted August 15, 2015 No other ideas, just try to print these values to see why inline style code with color is not showing {assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')} <li{if $group.default == $id_attribute} class="selected"{/if}> {$img_color_exists|var_dump} ---- {$colors.$id_attribute.value|var_dump} <a href="...... Link to comment Share on other sites More sharing options...
VitruvianMan Posted August 16, 2015 Author Share Posted August 16, 2015 SOLVED! It was some bug in template. 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