Reputation: 880
I have a problem into a Prestashop 1.7 solution.
Into a Product page, i want to show 2 prices (include and exclude VAT)
<span itemprop="price" content="{$product.price_amount}">{$product.price}</span>
This example show price with VAT. I don't find how show price without VAT too.
Thanks
Upvotes: 0
Views: 3772
Reputation: 582
There is the displayPrice()
method that you can use to format the price displayed.
But since version 1.7.6
you should use the formatPrice()
method, since displayPrice
is deprecated.
You can use it like this:
{block name='product_without_taxes'}
{if $priceDisplay != 1}
<p class="product-without-taxes">{l s='%price% tax excl.' d='Shop.Theme.Catalog' sprintf=['%price%' => Context::getContext()->currentLocale->formatPrice($product.price_tax_exc, $currency.iso_code)]}</p>
{/if}
{/block}
This way you'll have the price formatted with the current currency and the tax excl.
text. For example in French it will display 10,00 € HT
, 'HT' meaning 'tax excluded'
Upvotes: 0
Reputation: 1479
You can use {debug}
in your .tpl
and you will see all available variables that you can use.
Our you can use {$product|@var_dump}
which will show you what sub-variables the $product
variable contains
Upvotes: 1
Reputation: 186
You can use {$product.price_tax_exc}
variable to display price with tax excluded.
Upvotes: 1