jokoVvf Posted January 29, 2016 Share Posted January 29, 2016 Bonjour à tous, J'utilise prestashop 1.6 en local. La boutique que je suis en train de créer propose des produits d'occasions. De ce fait, je souhaiterais afficher un bandeau "Occasion" sur l'image du produit mais je ne trouve pas comment faire. Voici les bandeaux par défaut "Nouveauté" et "Promo". Est-ce que quelqu'un sait comment faire? Merci par avance Link to comment Share on other sites More sharing options...
Christophe Boix Posted January 30, 2016 Share Posted January 30, 2016 Bonjour,1/ dans ton product_list.tpl , tu peux rajouter cela :{if $product.condition=="new"} <img src="{$img_dir}bandeau_new.png" alt="New" class="bandeau_left" />{elseif $product.condition=="used"} <img src="{$img_dir}bandeau_used.png" alt="Used" class="bandeau_left" />{elseif $product.condition=="refurbished"} <img src="{$img_dir}bandeau_refurbished.png" alt="Refurbished" class="bandeau_left" />{/if}2/ dans ton CSS, tu peux faire :ul.product_list .bandeau_left{ position:absolute; top:0; left:0;}3/ et dans ton FTP, tu dois rajouter les 3 images dans le dossier img du theme : bandeau_new.png , bandeau_used.png , bandeau_refurbished.pngSi tu veux faire cela aussi dans une fiche produit, il faut utiliser un code un peu différent ( car la variable product sur une page produit est un objet ) :{if $product->condition=="new"} <img src="{$img_dir}bandeau_new.png" alt="New" class="bandeau_left" />{elseif $product->condition=="used"} <img src="{$img_dir}bandeau_used.png" alt="Used" class="bandeau_left" />{elseif $product->condition=="refurbished"} <img src="{$img_dir}bandeau_refurbished.png" alt="Refurbished" class="bandeau_left" />{/if} Link to comment Share on other sites More sharing options...
jokoVvf Posted February 9, 2016 Author Share Posted February 9, 2016 Bonjour, merci pour cette réponse. je vais regarder cela. 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