kull Posted June 4, 2011 Share Posted June 4, 2011 Bonsoir,je débute encore sous prestashop et je galére un peu (beaucoup?). Je n'arrive pas à ajouter le texte de description des catégories au dessus des listes de produits. J'utilise le thème Black & White. Merci d'avance.Voici le code du product-list.tpl {$category->name|escape:'htmlall':'UTF-8'} {if $products} {include file=$tpl_dir./product-sort.tpl} {/if} {$HOOK_LEFT_COLUMN} {if isset($products) AND $products} {assign var='liHeight' value=360} {assign var='nbItemsPerLine' value=4} {assign var='nbLi' value=$products|@count} {assign var='nbLines' value=$nbLi/$nbItemsPerLine|ceil} {assign var='ulHeight' value=$nbLines*$liHeight} {foreach from=$products item=product name=products} {assign var='productLink' value=$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)} {if $product.on_sale} {l s='On sale!'} {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product.reduction_from))} {l s='Price lowered!'} {/if} {if $product.new == 1}{l s='new'}{/if} {$product.name|truncate:30|escape:'htmlall':'UTF-8'} {displayWtPrice p=$product.price}{l s='View'} {l s='Cart'} {/foreach} {else} {l s='No products'} {/if} <!-- Pagination --> {include file=$tpl_dir./pagination.tpl} <!-- /MODULE Home Featured Products --> Link to comment Share on other sites More sharing options...
Asenar Posted June 4, 2011 Share Posted June 4, 2011 Bonjour,de mémoire il faudrait utiliser {$category->description} à l'endroit où tu veux que ça s'affiche, mais il vaudrait mieux mettre ça dans le fichier category.tpl car product-list.tpl est utilisé pour plusieurs listes différentes. Link to comment Share on other sites More sharing options...
kull Posted June 5, 2011 Author Share Posted June 5, 2011 Merci de votre aide, je vais aller voir ce que ça donne. 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