KubitDesign Posted September 5, 2011 Share Posted September 5, 2011 Hi All, I wonder is someone could shed some light on this. I would like to display products prices BOTH with and without tax (or in my case VAT, which I have already adjusted in translations) so the product price shows like so: Total ex. vat: £00.00 Total inc. vat £00.00 I have seem people talk about other workarounds adjusting the products.tpl, but these solutions have been used in earlier versions of prestashop and the code seems to have changed in my version of prestashop, and therefore I am struggling to find a solution. I am using prestashop version 1.4.4.0 Thank you in advance for any help! Link to comment Share on other sites More sharing options...
KubitDesign Posted September 5, 2011 Author Share Posted September 5, 2011 Has no one got any suggestions on this? Any help at all is truly appreciated! Link to comment Share on other sites More sharing options...
KubitDesign Posted September 5, 2011 Author Share Posted September 5, 2011 I don't want to sound like I am begging! But I would really appreciate any help on this. Link to comment Share on other sites More sharing options...
AKJV Posted October 17, 2011 Share Posted October 17, 2011 Hi KubitDesign, Not sure if you still need any help with this, but I just helped someone else with a similar request and the code change below works in PS 1.4.4. For homefeatured: Copy /modules/homefeatured/homefeatured.tpl to themes/your_theme/homefeatured/ (create the latter folder yourself) and change in copied homefeatured.tpl this (line 44): {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if} in: {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{l s='tax excl.' mod='homefeatured'} {convertPrice price=$product.price_tax_exc}<br />{l s='tax incl.' mod='homefeatured'} {convertPrice price=$product.price}{/if}</span></p>{else}<div style="height:21px;"></div>{/if} For product-lists: Change in /themes/your_theme/product-list.tpl this (line 43): {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if} in: {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{l s='tax excl.'} {convertPrice price=$product.price_tax_exc}<br />{l s='tax incl.'} {convertPrice price=$product.price}{/if}</span><br />{/if} For product pages: Change in /themes/your_theme/product.tpl this (lines 254-259): {if $priceDisplay >= 0 && $priceDisplay <= 2} <span id="our_price_display">{convertPrice price=$productPrice}</span> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} {/if} in: {if $priceDisplay >= 0 && $priceDisplay <= 2} <span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}</span> {l s='tax excl.'}</span><br /> <span id="our_price_display">{convertPrice price=$productPrice}</span> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} {/if} Change 'tax incl/tax excl' in whatever you prefer. Hope this helps. 6 Link to comment Share on other sites More sharing options...
DJPhill Posted April 27, 2012 Share Posted April 27, 2012 Hi. Does any of the above need to be changed for 1.4.7.3? Thanks Link to comment Share on other sites More sharing options...
deonderd Posted February 14, 2013 Share Posted February 14, 2013 Does this work for 1.5.3.1 ? Link to comment Share on other sites More sharing options...
malcek Posted February 20, 2013 Share Posted February 20, 2013 Does this work for 1.5.3.1 ? Yes it does! only last {/if} you have to delete. Martin Link to comment Share on other sites More sharing options...
malcek Posted February 20, 2013 Share Posted February 20, 2013 Another thing to change: in product css find (around 218 line) .our_price_display { padding-bottom:10px; font-weight:bold; font-size:16px; line-height:25px; color:#9b0000 } and after that add: #pretaxe_price { padding-bottom:10px; font-weight:bold; font-size:24px; line-height:25px; color:#9b0000 } so you can have different size of prices Martin 1 Link to comment Share on other sites More sharing options...
mowax Posted March 9, 2013 Share Posted March 9, 2013 I'm using 1.4.6.2 and this doesn't work for me with products that have attributes. It displays incorrect values for excl. and incl. tax. (ie. the excl. tax price is 20% lower than it should be, and the incl. tax price shows the excl. tax price.) Does anyone know how to fix that? Link to comment Share on other sites More sharing options...
mowax Posted March 9, 2013 Share Posted March 9, 2013 Now I realise this is because I have set Customers > Groups > Default > Price display method = Tax Excluded so the $productPrice is without tax already, so putting _tax_exc after it will return the base price reduced by the tax rate. So is there any way to display the price incl. tax, when the Price display method = Tax Excluded? I have chosen Tax Excluded because I want to itemise tax separately in the shopping cart and invoice, as I'm sure most B2B sellers will want to do. Link to comment Share on other sites More sharing options...
Källans Posted July 2, 2013 Share Posted July 2, 2013 Hi malcek. Would you mind to clarify what {/if} I have to delete. There is more than one at the end of all of the lines. Kind regards Weronicha Link to comment Share on other sites More sharing options...
WilkoHartung Posted April 30, 2014 Share Posted April 30, 2014 (edited) Hi, still struggling with the pricing I manage to set the pricing on the productpage http://techkoop.nl/nl/sanitairkranen/161-doucheset-met-thermosstaatkraan.html But This also needs to be on the homefeature page. How can I display product price with and without tax on the homefeature page http://techkoop.nl/nl/47-hand-tools I'm looking into file cshomefeature_itemshow.tpl <div class="item_show"> <div class="image"> <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_block_home" title=""> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt=""/> {if $product.specific_prices} {if $product.specific_prices.reduction>0} {if $product.specific_prices.reduction_type == 'percentage'} <span class="on_sale"> <span class="percen"> -{$product.specific_prices.reduction*100}% </span> </span> {else} <span class="on_sale"> <span class="amount"> -{convertPrice price=$product.reduction} </span> </span> {/if} {/if} {/if} </a> </div> <div class="name_product"> <h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'|truncate:45:'...'}</a></h3> </div> <p class="product_desc">{$product.description_short|strip_tags:'UTF-8'|truncate:45:'...'}</p> {if $product.ratting >0} <div class="star_content clearfix"> {section name="i" start=0 loop=5 step=1} {if $product.ratting le $smarty.section.i.index} <div class="star"></div> {else} <div class="star star_on"></div> {/if} {/section} </div> {/if} <div class="content_price"> {if $product.reduction}<span class="price old">{convertPrice price=$product.price_without_reduction}</span>{/if} {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price{if $product.reduction}{/if}">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>{/if} </div> </div> Edited April 30, 2014 by WilkoHartung (see edit history) Link to comment Share on other sites More sharing options...
WilkoHartung Posted April 30, 2014 Share Posted April 30, 2014 (edited) I also found the module for the quick view in the file csproduct.tpl I think I have to change this? to show both pricing.. {/if} {if !$priceDisplay || $priceDisplay == 2} {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {elseif $priceDisplay == 1} {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} {/if} var productPriceWithoutReduction = '{$productPriceWithoutReduction}'; var productPrice = '{$productPrice}'; It's hard when your not a programmer Edited April 30, 2014 by WilkoHartung (see edit history) Link to comment Share on other sites More sharing options...
PrestaShark Posted June 16, 2014 Share Posted June 16, 2014 Hi KubitDesign, Not sure if you still need any help with this, but I just helped someone else with a similar request and the code change below works in PS 1.4.4. For homefeatured: Copy /modules/homefeatured/homefeatured.tpl to themes/your_theme/homefeatured/ (create the latter folder yourself) and change in copied homefeatured.tpl this (line 44): {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if} in: {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{l s='tax excl.' mod='homefeatured'} {convertPrice price=$product.price_tax_exc}<br />{l s='tax incl.' mod='homefeatured'} {convertPrice price=$product.price}{/if}</span></p>{else}<div style="height:21px;"></div>{/if} For product-lists:Change in /themes/your_theme/product-list.tpl this (line 43): {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if} in: {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{l s='tax excl.'} {convertPrice price=$product.price_tax_exc}<br />{l s='tax incl.'} {convertPrice price=$product.price}{/if}</span><br />{/if} For product pages:Change in /themes/your_theme/product.tpl this (lines 254-259): {if $priceDisplay >= 0 && $priceDisplay <= 2} <span id="our_price_display">{convertPrice price=$productPrice}</span> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} {/if} in: {if $priceDisplay >= 0 && $priceDisplay <= 2} <span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}</span> {l s='tax excl.'}</span><br /> <span id="our_price_display">{convertPrice price=$productPrice}</span> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} {/if} Change 'tax incl/tax excl' in whatever you prefer. Hope this helps. We have almost three years later but Your solution for product-list (used in homefeatured too!) works like a charm with 1.5.6.2 Thanks Link to comment Share on other sites More sharing options...
Teapot Creative Posted August 18, 2014 Share Posted August 18, 2014 Now I realise this is because I have set Customers > Groups > Default > Price display method = Tax Excluded so the $productPrice is without tax already, so putting _tax_exc after it will return the base price reduced by the tax rate. So is there any way to display the price incl. tax, when the Price display method = Tax Excluded? I have chosen Tax Excluded because I want to itemise tax separately in the shopping cart and invoice, as I'm sure most B2B sellers will want to do. BUMP... anyone got a solution to the above ? Nick Link to comment Share on other sites More sharing options...
mowax Posted January 15, 2015 Share Posted January 15, 2015 BUMP... anyone got a solution to the above ? Nick This is really important now, as google will suspend merchant center product listings that don't show prices including tax on the landing page. How can we display the price incl. tax, when the Price display method = Tax Excluded? Please! Link to comment Share on other sites More sharing options...
mowax Posted January 29, 2015 Share Posted January 29, 2015 (edited) {convertPrice price=$productPrice*1.2} I came up with this dirty fix, obviously I have to remember to update the code if the tax rate changes, but it at least it works for products without attributes. But for products with attributes, this price does not update when another attribute is selected. How can I make this price update when an attribute is selected? Anybody? Thanks for any suggestions! Edited January 29, 2015 by mowax (see edit history) Link to comment Share on other sites More sharing options...
Patrik179 Posted February 1, 2015 Share Posted February 1, 2015 Hello. I will also work on version 1.6.0.9? Link to comment Share on other sites More sharing options...
vmthang Posted February 13, 2015 Share Posted February 13, 2015 (edited) Hello, Thanks for your post. It works very well. However I have a problem, if a customer registered with VAT number, their cart will display Zero VAT!! This only happens with customer with VAT number which is a required field in customer registration process. Could you please let me know how to fix this?? Thank you very much for your help. Hi KubitDesign,Not sure if you still need any help with this, but I just helped someone else with a similar request and the code change below works in PS 1.4.4.For homefeatured:Copy /modules/homefeatured/homefeatured.tpl to themes/your_theme/homefeatured/ (create the latter folder yourself) and change in copied homefeatured.tpl this (line 44): {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if}in: {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{l s='tax excl.' mod='homefeatured'} {convertPrice price=$product.price_tax_exc}<br />{l s='tax incl.' mod='homefeatured'} {convertPrice price=$product.price}{/if}</span></p>{else}<div style="height:21px;"></div>{/if}For product-lists:Change in /themes/your_theme/product-list.tpl this (line 43): {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if}in: {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{l s='tax excl.'} {convertPrice price=$product.price_tax_exc}<br />{l s='tax incl.'} {convertPrice price=$product.price}{/if}</span><br />{/if}For product pages:Change in /themes/your_theme/product.tpl this (lines 254-259): {if $priceDisplay >= 0 && $priceDisplay <= 2} <span id="our_price_display">{convertPrice price=$productPrice}</span> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} {/if}in: {if $priceDisplay >= 0 && $priceDisplay <= 2} <span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}</span> {l s='tax excl.'}</span><br /> <span id="our_price_display">{convertPrice price=$productPrice}</span> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} {/if}Change 'tax incl/tax excl' in whatever you prefer.Hope this helps. Edited February 13, 2015 by vmthang (see edit history) Link to comment Share on other sites More sharing options...
jojo89 Posted June 10, 2015 Share Posted June 10, 2015 hi everybody, why when i use the getPrice method in a php file i don't get the price but un object :s ? normaly getPrice return an float Prestashop 1.6 Link to comment Share on other sites More sharing options...
KordonWorld Posted June 19, 2015 Share Posted June 19, 2015 How can I display price with and without tax in scart? Link to comment Share on other sites More sharing options...
ukbaz Posted July 1, 2015 Share Posted July 1, 2015 I too need to display both inc and ex tax prices. I have managed to get both showing on the product page, but when selection a product with options and a price differential the inc tax calculation does not update on the page - giving the wrong inc Tax figure! Google now tell me that Shopping Ads will be suspended unless I display prices inc Tax. Despite main business being B2B and thus need to display to majority of customers Ex Tax! Has anyone an answer on how to get both prices displayed correctly in v1.6? Thanks Baz Link to comment Share on other sites More sharing options...
cvikenzi Posted September 17, 2015 Share Posted September 17, 2015 You can use module "Dual display of Tax included and Tax excluded prices" from addons for display product price with tax and without tax together. Link to comment Share on other sites More sharing options...
prestashopnew Posted February 27, 2016 Share Posted February 27, 2016 Hello guys, I am using prestashop 1.6.1.4 I wish I could see the percentage discount for each product at the top right of the image, instead of the word "new" or "sale" I would appreciate your help, it is very important, thanks in advance Link to comment Share on other sites More sharing options...
giulomas Posted April 20, 2016 Share Posted April 20, 2016 Hi everyone! I wonder if anybody knows how to display the tax rate next to words "VAT included", in product-list.tpl and in product.tpl too... Many thanks for help Giuliano Link to comment Share on other sites More sharing options...
jenci Posted June 11, 2016 Share Posted June 11, 2016 Hi everyone! I am trying to achieve the same thing, but on different version of prestashop. How does it work for prestashop 1.6.1.3 cloud? Can I use the same code, I actually tried to find the suggested lines, but without any luck. Is there anyone who could guide me through on this? Thanks in advance Link to comment Share on other sites More sharing options...
jenci Posted June 16, 2016 Share Posted June 16, 2016 Hi everone I have prestashop 1.6.1.3 cloud Can anyone tell me on which lines can I find the the code what I have to change if the above mentioned works with my version of prestashop? Thank you in advance Link to comment Share on other sites More sharing options...
szilaszlo Posted January 12, 2017 Share Posted January 12, 2017 (edited) Hi there! It seems it is a dead topic, but i have to find a solution. We use PS 1.6.1.4. and a leo theme. If anybody read it, Who know, What I have to modify in the code above mentioned for show the VAT % after the price excluded, just put it there. THANK YOU! Lazlo Edited January 12, 2017 by szilaszlo (see edit history) Link to comment Share on other sites More sharing options...
NANO-Production Posted October 2, 2017 Share Posted October 2, 2017 Hi there! It seems it is a dead topic, but i have to find a solution. We use PS 1.6.1.4. and a leo theme. If anybody read it, Who know, What I have to modify in the code above mentioned for show the VAT % after the price excluded, just put it there. THANK YOU! Lazlo Hi I've found a solution for your problem. It has just one problem: if you have any product's attributes which can change the price value (example: Custom color YES (+ 200 USD) NO (+ 0 USD) , then only the price with tax included gonna change, if you select that attribute. <!-- prices --> <div class="price"> <p class="our_price_display" style="line-height: 0.6;" 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" >{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=''}{/if} {/if} <meta itemprop="priceCurrency" content="{$currency->iso_code}" /> {/if} </p> </br><p class="our_price_display" style="line-height: 0.6;" itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <span id="pretaxe_price" style="font-weight: 300; font-size: 12px; color: #000000;"> <span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> <span style="font-size: 10px; color: black;">{l s='bez DPH'}</span> </span> </p> <p id="reduction_percent" {if !$product->specificPrice || $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}> <span id="reduction_percent_display"> {if $product->specificPrice && $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if} </span> </p> <p id="old_price"{if (!$product->specificPrice || !$product->specificPrice.reduction) && $group_reduction == 0} class="hidden"{/if}> {if $priceDisplay >= 0 && $priceDisplay <= 2} <span id="old_price_display">{if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction}{/if}</span> {if $tax_enabled && $display_tax_label == 1}{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}{/if} {/if} </p> {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} </div> <!-- end prices --> Link to comment Share on other sites More sharing options...
cvikenzi Posted August 19, 2018 Share Posted August 19, 2018 (edited) Hi all, you can try this module for display both prices, VAT included with VAT excluded prices together, for all products. Even you can set price display restrictions for customers groups, languages, etc. Edited August 19, 2018 by cvikenzi (see edit history) Link to comment Share on other sites More sharing options...
hewal02 Posted April 28, 2021 Share Posted April 28, 2021 How to do it on the latest version? 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