stevent Posted September 27, 2018 Share Posted September 27, 2018 (edited) Bonjour à tous. PRESTA 1.7 Sur ce site : http://vu2005.host44.ntd.ch/ouator/301-439-ouator-cuivre-75g.html#/43-carton-par_12 Je tente d'afficher le prix à l'unité TOUT EN GARDANT LE PRIX PAR 12 ! Je ne parviens pas à trouver le champ adéquat. phpMyAdmin indique bien que le champ PRICE de la table PRODUCT pour ce produit est à l'unité. Pourtant {$product.price} affiche le prix par 12. {$product.unit_price} n'affiche rien. Pas d'erreur, juste rien. <span itemprop="price" content="{$product.price_amount}">{$product.price}</span><span>{$product.unit_price}</span> A l'aide svp ... Merci beaucoup Edited September 27, 2018 by stevent (see edit history) Link to comment Share on other sites More sharing options...
Mediacom87 Posted September 27, 2018 Share Posted September 27, 2018 Bonjour, prenez le fichier du template de base affichant les prix : catalog/_partials/product-prices.tpl vous devriez trouver le code qui permet l'affichage du prix à l'unité. {block name='product_unit_price'} {if $displayUnitPrice} <p class="product-unit-price sub">{l s='(%unit_price%)' d='Shop.Theme.Catalog' sprintf=['%unit_price%' => $product.unit_price_full]}</p> {/if} {/block} Ce code a une contrainte, il faut obligatoirement que l'unité du produit soit indiquée (par litre, par pièce, par kilo, ...) 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