Ludwig1 Posted July 13, 2015 Share Posted July 13, 2015 (edited) Hi!I am wondering if someone knows how to display both with and without tax in the shopping cart?I want to show my customers both how much it costs with and without tax. Ex. Total shipping cost: Free delivery!Total order (ex. tax): 0000 Total order (incl. tax): 0000Total order (should always be incl. tax) Now when I have activated the ex. tax it duplicates. (see attached file) Thank you in advance! Edited July 13, 2015 by Ludwig1 (see edit history) Link to comment Share on other sites More sharing options...
Ludwig1 Posted July 15, 2015 Author Share Posted July 15, 2015 (edited) Someone who have same problem or have done this?Great if you could help me out here.Thank you! Edited July 19, 2015 by Ludwig1 (see edit history) Link to comment Share on other sites More sharing options...
clint Posted July 24, 2015 Share Posted July 24, 2015 (edited) Hi, In shopping-cart.tpl you will find {if $use_taxes} <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price}</span> </td> {else} <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price_without_tax}</span> </td> {/if} This is the section that decides whether to display taxes, To show both you would need remove the if else statement and modify the table to display both {displayPrice price=$total_price} where you need tax inc price {displayPrice price=$total_price_without_tax} where you need exc tax price So you need to replace <tr class="cart_total_price"> <td colspan="{$col_span_subtotal}" class="total_price_container text-right"> <span>{l s='Total'}</span> </td> {if $use_taxes} <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price}</span> </td> {else} <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price_without_tax}</span> </td> {/if} </tr> with <tr class="cart_total_price"> <td colspan="{$col_span_subtotal}" class="total_price_container text-right"> <span>{l s='Total exc tax'}</span> </td> <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price_without_tax}</span> </td> </tr> <tr class="cart_total_price"> <td colspan="{$col_span_subtotal}" class="total_price_container text-right"> <span>{l s='Total inc tax'}</span> </td> <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price}</span> </td> </tr> Regards Clint Edited July 24, 2015 by clint (see edit history) Link to comment Share on other sites More sharing options...
Ludwig1 Posted July 25, 2015 Author Share Posted July 25, 2015 Hi, In shopping-cart.tpl you will find {if $use_taxes} <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price}</span> </td> {else} <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price_without_tax}</span> </td> {/if} This is the section that decides whether to display taxes, To show both you would need remove the if else statement and modify the table to display both {displayPrice price=$total_price} where you need tax inc price {displayPrice price=$total_price_without_tax} where you need exc tax price So you need to replace <tr class="cart_total_price"> <td colspan="{$col_span_subtotal}" class="total_price_container text-right"> <span>{l s='Total'}</span> </td> {if $use_taxes} <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price}</span> </td> {else} <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price_without_tax}</span> </td> {/if} </tr> with <tr class="cart_total_price"> <td colspan="{$col_span_subtotal}" class="total_price_container text-right"> <span>{l s='Total exc tax'}</span> </td> <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price_without_tax}</span> </td> </tr> <tr class="cart_total_price"> <td colspan="{$col_span_subtotal}" class="total_price_container text-right"> <span>{l s='Total inc tax'}</span> </td> <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price}</span> </td> </tr> Regards Clint Hi Clint! Thank you very much for your support! I tried back and forth to learn at first, and I did this: {if $use_taxes && $show_taxes && $total_tax != 0 } {if $priceDisplay != 0} <tr class="cart_total_price"> <td colspan="{$col_span_subtotal}" class="text-right">{if $display_tax_label}{l s='Total (inkl. moms)'}{else}{l s='Total'}{/if}</td> <td colspan="2" class="price" id="total_price_without_tax">{displayPrice price=$total_price}</td> </tr> {/if} <tr class="cart_total_tax"> <td colspan="{$col_span_subtotal}" class="text-right">{l s='Tax'}</td> <td colspan="2" class="price" id="total_tax">{displayPrice price=$total_tax}</td> </tr> {/if} <tr class="cart_total_price"> <td colspan="{$col_span_subtotal}" class="total_price_container text-right"> <span>{l s='Total'}</span> </td> {if $use_taxes} <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price}</span> </td> {else} <td colspan="2" class="price" id="total_price_container"> <span id="total_price">{displayPrice price=$total_price_without_tax}</span> </td> {/if} I happened to get exactly what I wanted, except that the Shipping cost is between the ex. tax and the inc. tax. Link to comment Share on other sites More sharing options...
clint Posted July 26, 2015 Share Posted July 26, 2015 If you replace the code stated in my previous post it will be in the correct place 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