Wstdhz Posted March 29, 2021 Share Posted March 29, 2021 (edited) 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> Edited March 29, 2021 by Jesse (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted March 29, 2021 Share Posted March 29, 2021 (edited) {Tools::displayPrice($cart.totals.total.amount - $cart.subtotals.tax.amount)} Edited March 29, 2021 by Guest (see edit history) 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