J'ai enfin trouvé comment ne faire apparaitre qu'un texte à la place d'une liste déroulante lorsque qu'un groupe d'attribut ne comporte qu'un seul attribut, ceci pour permettre de donner une information capitale sur un produit sans passer par les caractéristiques
Donc dans product.tpl vous devez remplacer :
<!-- attributes -->
{foreach from=$groups key=id_attribute_group item=group}
{assign var='groupName' value='group_'|cat:$id_attribute_group}
{/foreach}
par :<!-- attributes -->
{foreach from=$groups key=id_attribute_group item=group}
{assign var='groupName' value='group_'|cat:$id_attribute_group}
{if count($group.attributes) > 1}
{else}
{foreach from=$group.attributes key=id_attribute item=group_attribute}
{$group_attribute|escape:'htmlall':'UTF-8'}
{/foreach}
{/if}
{/foreach}
PrestatoolBox, la boite à outil pour Prestashop (Modules, Templates, Services)
Prestatools, l'annuaire des contributions



Back to top










