Jump to content

Totals in cart


Recommended Posts



I'd like to display tax-free total and including tax total in cart.

My group is actually setted on including tax.

I don't find any smarty variable to display tax-free total so tried a smarty calcul but it don't display decimals. Even with |string_format:"%.2f", it displays 80.00€ instead of 80.30€ for exemple.

The following code also display tax value.

Any idea to do this ? Thanks a lot !

<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 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 class="cart-summary-line">
      <small class="label">{$cart.subtotals.tax.label}</small>
      <small class="value">{$cart.subtotals.tax.value}</small>


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...