Jump to content

Display both VAT (included and excluded)


Recommended Posts

  • 3 weeks later...

For product list - edit /themes/your_theme/product-list.tpl ~line 52

For homefeatured - edit /themes/your_theme/modules/homefeatured/homefeatured.tpl ~line 46


In above files change this:

<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>

...to this:

<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{/if}</span>
<br><span class="price_tax_exc">{convertPrice price=$product.price_tax_exc} {l s='tax exc.'}</span>

You may need to add some stiling for .price_tax_exc

 

------------------------------

For product page - in file /themes/your_theme/product.tpl find this (~ line 405)

{if $priceDisplay == 2}
                    <br />
                    <span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s='tax excl.'}</span>
                {/if}

...and simply delete {if $priceDisplay == 2} and {/if}

 

 

  • Like 1
Link to comment
Share on other sites

Thanks a lot for the reply. I did the modification initially in product.tpl just to see how it looks but it still displays the same; that is just the price without VAT.

 

I just put the code into comments like:

                         <!-- {if $priceDisplay == 2} -->
                            <span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s='tax excl.'}</span>
                        <!-- {/if} -->
Link to comment
Share on other sites

Exactly. By removing/commenting {if} part you forced presta to show prices without tax, no matter what settings you have. But with settings like above your shop shows ONLY prices without tax anyway. Change it to "Tax included" to show both prices.

Link to comment
Share on other sites

×
×
  • Create New...