Jump to content

L'attribut "couleur" ne s'affiche pas sur la page produit


Recommended Posts

Bonjour,

 

sur ma page produit, mes petits carrés de couleurs ne s'affichent pas (les autres attributs en listes deroulantes, aucun soucis).

Après recherche il s'avère que le code généré, ne met pas les "<li>" et c'est ce qui cause le non affichage (quand je les ajoute dans firebug, ils s'affichent bien).
 

Le code de la page product-list-colors.tpl me parait OK, je ne trouve pas de paramétrage en BO.

Auriez vous une idée?

 

Code généré qui n'affiche pas les box :

<div id="attributes">
<div class="clearfix"></div>
<fieldset class="attribute_fieldset">
<div class="attribute_list">
<ul id="color_to_pick_list" class="clearfix">
<a id="color_6" class="color_pick" title="Vert" style="background:#019100;" name="Vert" href="http://latelierdeflora.com/PrestaShop/fr/2541-schulgarn-10-4.html"> </a>
<a id="color_17" class="color_pick selected" title="" name="" href="http://latelierdeflora.com/PrestaShop/fr/2541-schulgarn-10-4.html"> </a>
<a id="color_18" class="color_pick" title="BLEU MOYEN" style="background:#5d99ff;" name="BLEU MOYEN" href="http://latelierdeflora.com/PrestaShop/fr/2541-schulgarn-10-4.html"> </a>
<a id="color_19" class="color_pick" title="" name="" href="http://latelierdeflora.com/PrestaShop/fr/2541-schulgarn-10-4.html"> </a>
<a id="color_20" class="color_pick" title="" name="" href="http://latelierdeflora.com/PrestaShop/fr/2541-schulgarn-10-4.html"> </a>
</ul>
<input class="color_pick_hidden" type="hidden" value="17" name="group_3">
</div>
</fieldset>
</div>
</div>

En ajoutant les <li>, ça s'affiche

<div id="attributes">
<div class="clearfix"></div>
<fieldset class="attribute_fieldset">
<div class="attribute_list">
<ul id="color_to_pick_list" class="clearfix">
<li><a id="color_6" class="color_pick" title="Vert" style="background:#019100;" name="Vert" href="http://latelierdeflora.com/PrestaShop/fr/2541-schulgarn-10-4.html"> </a></li>
<li><a id="color_17" class="color_pick selected" title="" name="" href="http://latelierdeflora.com/PrestaShop/fr/2541-schulgarn-10-4.html"> </a></li>
<a id="color_18" class="color_pick" title="BLEU MOYEN" style="background:#5d99ff;" name="BLEU MOYEN" href="http://latelierdeflora.com/PrestaShop/fr/2541-schulgarn-10-4.html"> </a>
<li><a id="color_19" class="color_pick" title="" name="" href="http://latelierdeflora.com/PrestaShop/fr/2541-schulgarn-10-4.html"> </a></li>
<li><a id="color_20" class="color_pick" title="" name="" href="http://latelierdeflora.com/PrestaShop/fr/2541-schulgarn-10-4.html"> </a></li>
</ul>
<input class="color_pick_hidden" type="hidden" value="17" name="group_3">
</div>
</fieldset>
</div>
</div>

Code de product-list-colors.tpl

<ul class="color_to_pick_list clearfix">
	{foreach from=$colors_list item='color'}
		{assign var='img_color_exists' value=file_exists($col_img_dir|cat:$color.id_attribute|cat:'.jpg')}
		<li>
			<a href="{$link->getProductLink($color.id_product, null, null, null, null, null, $color.id_product_attribute)|escape:'html':'UTF-8'}" id="color_{$color.id_product_attribute|intval}" class="color_pick"{if !$img_color_exists && isset($color.color) && $color.color} style="background:{$color.color};"{/if}>
				{if $img_color_exists}
					<img src="{$img_col_dir}{$color.id_attribute|intval}.jpg" alt="{$color.name|escape:'html':'UTF-8'}" title="{$color.name|escape:'html':'UTF-8'}" width="20" height="20" />
				{/if}
			</a>
		</li>
	{/foreach}
</ul>

Merci beaucoup

 

Link to comment
Share on other sites

  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...