mbphotographe Posted June 8, 2020 Share Posted June 8, 2020 (edited) Bonjour, Je souhaiterais affiche en haut de mes fiches produits le bandeau de la catégorie à la quelle il appartient. J'ai récupérer le code du fichier category.tpl pour le mettre dans le fichier product.tpl mais il n'aime pas torp ça j'ai une page blanche ^^ Voici le code que j'ai mis dans mon fichier product.tpl : <img src="{$category.image.bySize.category_default.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}" class="img-fluid" width="{$category.image.bySize.category_default.width}" height="{$category.image.bySize.category_default.height}" > Du coup si quelqu'un a une idée de comment faire apparaitre le bandeau de la catégorie principale d'un produit sur la fiche produit je suis preneur Je suis sur Presta 1.7.4 Merci par avance pour votre aide. Edited June 8, 2020 by mbphotographe (see edit history) Link to comment Share on other sites More sharing options...
mbphotographe Posted June 8, 2020 Author Share Posted June 8, 2020 Bon en fait j'ai trouvé ma solution sur un post du forum que je n'avais pas vu : Et le code est : <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}"/> <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}"/> 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