Kapel Posted September 9, 2010 Share Posted September 9, 2010 Hello everyone I've registered, beacuse I have a tiny problem with my shop. I would like to have both prices (tax incl. and tax excl.) shown. Just like THIS guy has. Somewhere in the options I have found, that I can set either tax excluded or included. Is there any way to change this ? If it is possible, than it would be nice if the tax excluded price was displayed with a bigger font. I'm using Presta Shop 1.3.1.1 Link to comment Share on other sites More sharing options...
rocky Posted September 10, 2010 Share Posted September 10, 2010 There is no option in the Back Office to do this. The best you can do is edit all your TPL files and remove all the {if $priceDisplay} code so that both prices with and without tax are shown instead of choosing only one of them. Link to comment Share on other sites More sharing options...
Kapel Posted September 10, 2010 Author Share Posted September 10, 2010 Just remove to whole code ? Shouldn't I put something else instead ? I'm not shure what to remove.Just the {if $priceDisplay} ? Or {if $priceDisplay} and everything after that (as for the price) ? Link to comment Share on other sites More sharing options...
rocky Posted September 11, 2010 Share Posted September 11, 2010 For example, change line 18 of product-list.tpl (in PrestaShop v1.3.1) from: {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} to: {convertPrice price=$product.price} {l s='incl. tax'} {convertPrice price=$product.price_tax_exc} {l s='excl. tax'} Link to comment Share on other sites More sharing options...
Kapel Posted September 13, 2010 Author Share Posted September 13, 2010 Ok. Thanks a lot! I'm still thinking about a universal method. I have a bilangual shop, and "tax.incl" in all languages does not full satisfy me. Any chance of doing that, or is it too much effort ? Link to comment Share on other sites More sharing options...
rocky Posted September 13, 2010 Share Posted September 13, 2010 You can already do that using PrestaShop's translation tool. Just go to Tools > Translations, select "Front Office translations" in the dropdown, click language flag, then scroll down to the "product-list" section to change the text for "incl. tax" and "excl. tax" for that language. Link to comment Share on other sites More sharing options...
Kapel Posted September 13, 2010 Author Share Posted September 13, 2010 I am truly impressed. This is possibly the best support I've ever got. Thanks a lot for everything. Hopefully I won't have any problems with other things. Thanks again!CheersK. Link to comment Share on other sites More sharing options...
rocky Posted September 14, 2010 Share Posted September 14, 2010 Glad it works for you. Please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
vasekcekal Posted October 13, 2010 Share Posted October 13, 2010 Hello,thank you very much for this! It really help me But this is only in product-list.tpl. If I make this same in product.tpl, it isn't working. Please, Can you tell me what I have to edit in product.tpl to show prices with and without tax? Also please, what I must edit if I want to show excl. and incl. prices on Featured products on homepage?Sorry for my bad english.I have Version 1.3.2.3 on page www.test.atv-rakovnik.cz Link to comment Share on other sites More sharing options...
vasekcekal Posted October 15, 2010 Share Posted October 15, 2010 It is solved yet. I made this:In product.tpl is this: {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPrice(true, $smarty.const.NULL)} {if $tax_enabled}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {if $tax_enabled}{l s='tax excl.'}{/if} edit on this: {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPrice(true, $smarty.const.NULL)} {if $tax_enabled}{l s='tax incl.'}{/if} {/if} {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {if $tax_enabled}{l s='tax excl.'}{/if} {/if} Link to comment Share on other sites More sharing options...
rocky Posted October 16, 2010 Share Posted October 16, 2010 You need to take out the price display parts like {if $priceDisplay == 1} so that both prices are displayed no matter what your tax settings. Link to comment Share on other sites More sharing options...
dwatte Posted October 28, 2010 Share Posted October 28, 2010 This does not work if you have attributes that affects the price. Only the prechoosen pricestyle (with or without tax) gets updated, the other stays the same leaving a false price. At least for me with PS 1.3.2. Am I missing something? Dwatte Link to comment Share on other sites More sharing options...
rocky Posted October 29, 2010 Share Posted October 29, 2010 Your right. You will need to modify js/product.js in your theme's directory to make tax included and tax excluded displayed for combinations. The following code on lines 268-271 rewrites the prices: $('#our_price_display').text(formatCurrency(priceProduct, currencyFormat, currencySign, currencyBlank)); $('#pretaxe_price_display').text(formatCurrency(productPricePretaxed, currencyFormat, currencySign, currencyBlank)); $('#old_price_display').text(formatCurrency(productPriceWithoutReduction2, currencyFormat, currencySign, currencyBlank)); $('#ecotax_price_display').text(formatCurrency(selectedCombination['ecotax'], currencyFormat, currencySign, currencyBlank)); You will need to add another line to rewrite both prices. Link to comment Share on other sites More sharing options...
dwatte Posted October 29, 2010 Share Posted October 29, 2010 Thank you, I will try that.dwatte Link to comment Share on other sites More sharing options...
copain Posted October 29, 2010 Share Posted October 29, 2010 Hello Rocky,I'm facing the same problem.Please, can you tell me what line of code should be added in product.js?Thanks, Gaby Link to comment Share on other sites More sharing options...
dwatte Posted October 30, 2010 Share Posted October 30, 2010 This is how I did it. It seems to work with the attributes as well. Change the following code in product.tpl {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPrice(true, $smarty.const.NULL)} {if $tax_enabled}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {if $tax_enabled}{l s='tax excl.'}{/if} {/if} {if $priceDisplay == 2} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'} {/if} to this: {convertPrice price=$product->getPrice(true, $smarty.const.NULL)} {if $tax_enabled}{l s='tax incl.'}{/if} {if $priceDisplay == 1} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {if $tax_enabled}{l s='tax excl.'}{/if} {/if} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'} as in http://nordicase.com/shop (prelaunch website)dwatte Link to comment Share on other sites More sharing options...
copain Posted October 31, 2010 Share Posted October 31, 2010 Hello Dwatte,It works! Thanks a lot. Link to comment Share on other sites More sharing options...
wizkaa Posted February 9, 2011 Share Posted February 9, 2011 This is how I did it. It seems to work with the attributes as well. Change the following code in product.tpl {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPrice(true, $smarty.const.NULL)} {if $tax_enabled}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {if $tax_enabled}{l s='tax excl.'}{/if} {/if} {if $priceDisplay == 2} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'} {/if} to this: {convertPrice price=$product->getPrice(true, $smarty.const.NULL)} {if $tax_enabled}{l s='tax incl.'}{/if} {if $priceDisplay == 1} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {if $tax_enabled}{l s='tax excl.'}{/if} {/if} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'} as in http://nordicase.com/shop (prelaunch website)dwatte Hi,All code is fine for product and product-listbut I will have incl. tax and excl. tax on front pagehow do i do then?please see pictureSOLVED by my self. Link to comment Share on other sites More sharing options...
need4speed Posted February 17, 2011 Share Posted February 17, 2011 Nice solution. Thank you very much. Link to comment Share on other sites More sharing options...
Kapel Posted May 2, 2011 Author Share Posted May 2, 2011 Hello everyone!I'm back to the drawing board with this problem. I have updated my Prestashop to 1.4.1.0 and I have the same problem again. I've managed to show incl. and excl. in products, but I'm stuck with showing those on "featured products". Also the translation bit doesn't work anymore for me (or I have messed up something). CheersK.=====yay! another solved one I've managed to get "price included, price excluded" in the "featured products" section, in a multilangual way.I have edited the /modules/homefeatured/homefeatured.tpl file:FROM: {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}{else} TO: K. {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} {if !$priceDisplay} {convertPrice price=$product.price_tax_exc} {l s='tax excl.' mod='homefeatured'} {convertPrice price=$product.price} {l s='tax incl.' mod='homefeatured'}{else} {convertPrice price=$product.price_tax_exc}{/if} {else} Link to comment Share on other sites More sharing options...
yoshi Posted May 24, 2011 Share Posted May 24, 2011 {convertPrice price=$product->getPrice(true, $smarty.const.NULL)} {if $tax_enabled}{l s='tax incl.'}{/if} {if $priceDisplay == 1}{convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {if $tax_enabled}{l s='tax excl.'}{/if} {/if} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'} Hi, I did that and I have question.How can I change price place. I need first price without tax and second price with tax. Link to comment Share on other sites More sharing options...
Kapel Posted May 24, 2011 Author Share Posted May 24, 2011 {convertPrice price=$product->getPrice(true, $smarty.const.NULL)} {if $tax_enabled}{l s=‘tax excl.’}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)}{if $tax_enabled}{l s=‘tax incl.’}{/if} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s=‘tax excl.’} Try this, hope it works. It's all about swapping the order of those two. Link to comment Share on other sites More sharing options...
yoshi Posted May 25, 2011 Share Posted May 25, 2011 It dosen't work ;/ Link to comment Share on other sites More sharing options...
Kapel Posted May 25, 2011 Author Share Posted May 25, 2011 What version of prestashop do you have ? Link to comment Share on other sites More sharing options...
yoshi Posted May 25, 2011 Share Posted May 25, 2011 1.3.6 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