Jump to content

Edit History

Wstdhz

Wstdhz

  

Hi,

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>

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

 

Wstdhz

Wstdhz

  

Hi,

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

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

 

×
×
  • Create New...