Jump to content

Affichage total HT et TTC dans le panier


Recommended Posts

Bonjour,

Dans mon panier, j'aimerais pouvoir afficher les totaux HT et TTC.

Mon groupe est actuellement configuré en TTC.

N'ayant trouvé aucune variable dédiée à un affichage HT du total, j'ai tenté une soustraction SMARTY. Seulement voilà, le total n'affiche pas de décimales. Avec |string_format:"%.2f" il affiche par exemple 80.00€ alors que le résultat est 80.30€

Une idée de pouvoir ou d'une solution alternative ? Merci.

<div class="card-block">
    <div class="cart-summary-line cart-total">
      <span class="label">{$cart.totals.total.label} {$cart.labels.tax_short}</span>
      <span class="value">{$cart.totals.total.value}</span>
    </div>

 <div class="cart-summary-line cart-total">
      <span class="label">Total HT</span>
      <span class="value">{$cart.totals.total.value-$cart.subtotals.tax.value|string_format:"%.2f"}</span>
 </div>

    
 <div class="cart-summary-line">
      <small class="label">{$cart.subtotals.tax.label}</small>
      <small class="value">{$cart.subtotals.tax.value}</small>
 </div>
 </div>

 

Edited by Jesse (see edit history)
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...