dgdev Posted July 15, 2009 Share Posted July 15, 2009 Bonjour,Je rentre doucement dans la syntaxe Smarty de Prestashop.Je souhaite lister dans la page de liste des catégories les produits disponibles pour chaque catégorie.J'ai tenté quelque chose comme ça : {foreach from=$subcategories item=subcategory} if($i%3==0){ echo " class='sans_border'";} $i++; {/php} > getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'} <!-- Tentative d'insertion de produits --> {foreach from=$products item=product name=products} {$product.name|truncate:35|escape:'htmlall':'UTF-8'} {/foreach} <!-- FIN Tentative d'insertion de produits --> {/foreach} Masi cela ne fonctionne pas, je souhaite que la boucle product liste les produits présents dans la subcategory.Quelqu'un peut-il m'indiquer le nom des variable à utiliser (dans foreach from=$products item=product name=products je crois).Merci d'avance. 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