Formation Prestashop intégrateur: Exercices / Solution modification d'une liste
Vous êtes ici : Accueil / Prestashop intégrateur / Exercices / Solution modification d'une liste
Solution modification d'une liste
Comment ajouter le nom de la catégorie par défaut d'un produit, devant son nom, sur la liste ds nouveaux produits.
Solution proposée :
{extends file='catalog/listing/product-list.tpl'}
{block name='product_name'}
<h2 class="h3 product-title" itemprop="name" style="margin-top:0">
<a href="{$product.url}">{$product.category_name}<br>{$product.name|truncate:30:'...'}</a>
</h2>
{/block}
Cette solution modifie le block productproduct_name_price_and_shipping dans le template new-products.tpl.