bathie Posted January 22, 2016 Share Posted January 22, 2016 Salut comme l'indique le titre je voudrais afficher prix dégressif dans ma fiche produit , j'ai reussi à le faire pour la page product-liste en affichant quelque chose du genre : 20€ pour 1 30€ pour 2 (ici on a appliqué la réduction) mais pour la fiche produit j'arrive pas à afficher la même pour chaque produit ayant une réduction pour info je vais mettre le code que j'ai utilisé pour l'affichage dans product-list <span itemprop="price" class="price product-price{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} product-price-new{/if}"> <!-- {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}--> {assign var='prices' value=SpecificPrice::getByProductId($product.id_product)} {if $prices[0]["reduction"] != 0 && $prices[0]["from_quantity"] == 2} {convertPrice price=$product.price} pour 1<br/> {if $prices[0]["reduction_type"] == 'amount'} {assign var=discount value=($product.price_without_reduction - $prices[0]["reduction"])} {math assign=price2 equation="x * y" x=$discount y=$prices[0]["from_quantity"] format="%.2f"}{$currency->symbol} {convertPrice price=$price2} pour 2 {else} {assign var=discount value=($product.price_without_reduction * $prices[0]["reduction"] * 2)} {math assign=price2 equation="y - x" x=$discount y=$product.price*2 format="%.2f"} {convertPrice price=$price2} pour 2 {/if} {elseif !$priceDisplay} {convertPrice price=$product.price} {else} {convertPrice price=$product.price_tax_exc} {/if} </span> si quelqu'un à une idée de comment affiché la meme chose sur fiche produit Link to comment Share on other sites More sharing options...
Oron Posted January 24, 2016 Share Posted January 24, 2016 Bonjour Veuillez lire les règles et lire les thèmes des forums. Le forum est divisé en plusieurs sous-forums pour plus de clarté. Et je pense qu'il n'est pas difficile de trouver dans quel forum créer votre topic. Votre topic va être déplacé, mais vu que plusieurs sujets sont mal placé je vais les déplacer en masse. 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