Marlènee Posted October 18, 2013 Share Posted October 18, 2013 Bonsoir, Je propose des produits avec un choix de couleurs. Les couleurs s'affichent donc dans des petits carrés. Il y a 4 carrés de couleurs sur les lignes et pas mal de colonnes car j'ai une vingtaine de couleurs à afficher. Voici ce que ça rend actuellement : Et je voudrais donc augmenter le nombre de colonnes pour que la palette de couleur soit plus sympas. Si ça se trouve dans le fichier global.css de mon thème, je ne comprends pas ce qu'il faudrait changer. Voici le code concernant la fiche produit du fichier global.css /* ************************************************************************************************ PRODUCT PAGE ************************************************************************************************ */ /* BLOCK idTabs ******************************************************************************** */ .idTabs { list-style-type: none; margin-top: 20px; padding:0 5px; border-bottom: 8px solid #f7b900 } ul.idTabs li { float: left; margin-right: 1px } .idTabs a { display:block; padding:10px 10px 7px 10px; font-weight:bold; text-decoration:none; color:#fff; background:#000 } .idTabs .selected { color:#000; background: url(../img/bg_li_idTabs.png) repeat-x 0 0 } #more_info_sheets {padding-top:10px} #more_info_sheets ul, #more_info_sheets ol, #more_info_sheets dl {margin-left:20px} #more_info_sheets em {font-style:italic} #more_info_sheets .product_desc{ margin-top:5px } #more_info_sheets .product_desc .product_image{ float:left } #more_info_sheets .product_desc .block_description{ float:left; margin-left:10px; width:420px } #more_info_sheets .product_desc .clear_product_desc{ clear:both; height:0px; line-height:0px } /* Make sure lists are correctly displayed in tinyMCE BO edition mode too */ #short_description_content ul, #short_description_content ol, #short_description_content dl, #tinymce ul, #tinymce ol, #tinymce dl {margin-left:20px} .block_hidden_only_for_screen {display:none} Sinon j'ai aussi lu sur un post de ce forum qu'il faudrait peut-être modifier le fichier product.tpl du thème, mais je ne vois pas quoi changer. Je vous donne un extrait (j'ai pu le trouver grace à Firebug que m'avais conseillé un membre de ce forum, Julien64) : Ligne 246: <!-- colors --> <div id="color_picker"> <p>{l s='Pick a color:' js=1}</p> <div class="clear"></div> <ul id="color_to_pick_list" class="clearfix"> {foreach from=$colors key='id_attribute' item='color'} <li><a id="color_{$id_attribute|intval}" class="color_pick" style="background: {$color.value};" onclick="updateColorSelect({$id_attribute|intval});$('#wrapResetImages').show('slow');" title="{$color.name}">{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$color.name}" width="20" height="20" />{/if}</a></li> {/foreach} </ul> <div class="clear"></div> </div> {/if}*} {if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)} <!-- add to cart form--> <form id="buy_block" {if $PS_CATALOG_MODE AND !isset($groups) AND $product->quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart')}" method="post"> Ligne 273: <!-- attributes --> <div id="attributes"> {foreach from=$groups key=id_attribute_group item=group} {if $group.attributes|@count} <fieldset class="attribute_fieldset"> <label class="attribute_label" for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label> {assign var="groupName" value="group_$id_attribute_group"} <div class="attribute_list"> {if ($group.group_type == 'select')} <select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="attribute_select" onchange="findCombination();getProductAttribute();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option> {/foreach} </select> {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} <li{if $group.default == $id_attribute} class="selected"{/if}> <a id="color_{$id_attribute|intval}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}" style="background: {$colors.$id_attribute.value};" title="{$colors.$id_attribute.name}" onclick="colorPickerClick(this);getProductAttribute();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if}"> {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} </a> </li> {if ($group.default == $id_attribute)} {$default_colorpicker = $id_attribute} {/if} {/foreach} </ul> <input type="hidden" class="color_pick_hidden" name="{$groupName}" value="{$default_colorpicker}" /> {elseif ($group.group_type == 'radio')} {foreach from=$group.attributes key=id_attribute item=group_attribute} <input type="radio" class="attribute_radio" name="{$groupName}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} onclick="findCombination();getProductAttribute();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if}"> {$group_attribute|escape:'htmlall':'UTF-8'}<br/> {/foreach} {/if} </div> </fieldset> {/if} {/foreach} </div> {/if} <p id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}> <label for="product_reference">{l s='Reference:'} </label> <span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span> </p> Mais malheureusement je ne vois pas où changer le nombre d'icones couleurs affiché sur une colonne. Pouvez-vous m'aider SVP ? Merci Link to comment Share on other sites More sharing options...
Marlènee Posted October 18, 2013 Author Share Posted October 18, 2013 Found it ! Dans product.css, ligne 197 :.attribute_list #color_to_pick_list { list-style-type:none; width:125px; 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