Jump to content

Display prices with and without tax (VAT) on product page PS 1.6


Recommended Posts

Hello!

 

I have a b2b shop, so I have to display the prices with and without taxes.

I've managed to do that on product list, but can't figure out how to do it on product pages.

 

I've done it on PS 1.4 and 1.5 but product.tpl just changed a bit in 1.6 and I cant figure out how to display both prices.

 

I know that's the part I should modify in product.tpl, but don't know exactly how: 

<!-- prices -->
							<div class="price">
								<p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
									{if $product->quantity > 0}<link itemprop="availability" href="http://schema.org/InStock"/>{/if}
									{if $priceDisplay >= 0 && $priceDisplay <= 2}
										<span id="our_price_display" itemprop="price">{convertPrice price=$productPrice}</span>
										<!--{if $tax_enabled  && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))}
											{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}
										{/if}-->

Can anyone help me in this?

 

Thank you! :)

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I've managed to fix this issue, the only problem whit this piece of code in product.tpl: 

<p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
									{if $product->quantity > 0}<link itemprop="availability" href="http://schema.org/InStock"/>{/if}
									{if $priceDisplay >= 0 && $priceDisplay <= 2}
										<span id="our_price_display" itemprop="price">{convertPrice price=$productPrice/1.27}</span>
										{if $tax_enabled  && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))}
											{if $priceDisplay == 1}{l s='nettó'}{else}{l s='nettó'}{/if}
										{/if}
										<meta itemprop="priceCurrency" content="{$currency->iso_code}" />
										{hook h="displayProductPriceBlock" product=$product type="price"}
									{/if}
								</p><br />
				{if $priceDisplay >= 0 && $priceDisplay <= 2}
										<span id="our_price_display" itemprop="price">{convertPrice price=$productPrice}</span>
										{if $tax_enabled  && ((isset($display_tax_label) && $display_tax_label == 2) || !isset($display_tax_label))}
											{if $priceDisplay == 2}{l s='bruttó'}{else}{l s='bruttó'}{/if}
										{/if}
										<meta itemprop="priceCurrency" content="{$currency->iso_code}" />
										{hook h="displayProductPriceBlock" product=$product type="price"}
									{/if}
								</p>

My only problem is when a product has combinations (like size of  a glove), it's still showing only the price with tax 2 times, instead of showing the price without tax and the price with the tax under it, like on every other products. Does anyone know where do I have to look in product.tpl for the section which generates the combination prices. (In my stoe the combinations never have effect on prices).

Edited by Budapestis (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...