Jump to content

Prix d'achat dans fiche produit


HARVIE

Recommended Posts

Bonjour,

J’avais lancé une question sur ce forum: comment afficher le prix d’achat sur la fiche produit (que j’ai appelé moi prix catalogue)?
Et en cherchent j’ai trouvé comment faire avec ce code dans product.tpl (en dessous de ) :


{if $product->wholesale_price}{l s=‘Prix catalogue: ‘}{$product->wholesale_price|escape:‘htmlall’:‘UTF-8’} €HT{/if}

Voilà seulement le prix est affiché avec 6 chiffres après la virgule. Et j’aimerais seulement en afficher 2. Quelqu’un sait-il comment modifier ça?

Merci,

Harvie

Link to comment
Share on other sites

je ne sait pas trop comment l'utiliser mais voici la fonction qui affiche le prix ttc dans le fichier product.tpl.

Cette fonction limite à 2 chiffres après la virgule :

{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}



à étudier

Link to comment
Share on other sites

oui je pense aussi que c'est ce genre de fonction à utiliser...mais je ne sais pas comment comment l'utiliser pour le prix d'achat. Et c'est la ma question: dans quel fichier dois-je intégrer cette fonction et comment l'adapté pour le prix d'achat (= wholesale_price )??

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...