Jump to content

I want to show both prices in all products (including tax and excluding tax)


mirec

Recommended Posts

Hi guys, I am wondering, what´s the reason, that option of showing both prices has been removed in PS 1.3 and there´s just option to show just one of them, not both. For me it doesn´t make a sende, that´s step backward…
So my question is, why is that?
and please can someone help me to figure it out how we can show both type of price in product or should we wait for any PS upgrade??

Link to comment
Share on other sites

have come up with a very quick and dirty fix for this (there may be a better way of doing this but I've only been using PrestaShop for 4 hours so I havent had time to look through all the templates and php files)


Go to themes/yourtheme/product-list.tpl and find around line 18

{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}




replace with

Price: {convertPrice price=$product.price_tax_exc}


({convertPrice price=$product.price} incl. VAT)





this will give you the following

Price: £99.95
(£117.44 incl. VAT)


you can then style the text however you want

I've gone for text size of 1em and a text align of left... but thats up to you

Link to comment
Share on other sites

and then

Go to themes/yourtheme/product.tpl and find around line 196

{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}



replace with


{if !$priceDisplay}
Price: {convertPrice price=$product->getPrice(false, $smarty.const.NULL)}


({convertPrice price=$product->getPrice(true, $smarty.const.NULL)} incl. VAT)
{/if}

Link to comment
Share on other sites

Thanks, but it doesn´t work for me :( no change....still shows only one price


originally I had the same problem until I realised that I needed to set the tax for my zone (this isnt selected as standard)

go to payment/taxes/ then select 'edit' button of your tax rate. then select your zone... I just did all of them (Africa, Asia, Europe etc etc) then both the incl and exec prices showed with the code I posted
Link to comment
Share on other sites

Hi Fiveforty,

My code isn't similar to the one you are modifying. I am not using the standard prestashop theme, and that's where the difference is.

Could you give me some advise what I should modify in my code in order to have the same effect as you do?
My code:
product-list.tpl

{if !$priceDisplay || $priceDisplay == 2}

{convertPrice price=$product.price}{if $priceDisplay == 2} {l s='Tax inc.'}{/if}
{/if}
{if $priceDisplay}
{convertPrice price=$product.price_tax_exc}{if $priceDisplay == 2} {l s='Tax exc.'}{/if}
{/if}


product.tpl


{if !$priceDisplay || $priceDisplay == 2}
{convertPrice price=$product->getPrice(true, $smarty.const.NULL, 2)}
{l s='tax incl.'}
{/if}
{if $priceDisplay == 1}
{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}
{l s='tax excl.'}
{/if}

{if $priceDisplay == 2}




thanks in advance,
Manuel

Link to comment
Share on other sites

Hi Fiveforty,

I am trying to attach the code again but now into the pink bar as yours. Not sure if it is going to work!
product-list.tpl:

 {if !$priceDisplay || $priceDisplay == 2}{convertPrice price=$product.price}{if $priceDisplay == 2} {l s='Tax inc.'}{/if}{/if}
               {if $priceDisplay}{convertPrice price=$product.price_tax_exc}{if $priceDisplay == 2} {l s='Tax exc.'}{/if}{/if}



product.tpl:

               {if !$priceDisplay || $priceDisplay == 2}
{convertPrice price=$product->getPrice(true, $smarty.const.NULL, 2)}
                       {l s='tax incl.'}
               {/if}
               {if $priceDisplay == 1}
{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}
                       {l s='tax excl.'}

               {/if}

               {if $priceDisplay == 2}




Hope this works!

Link to comment
Share on other sites

  • 2 weeks later...

Hi Fiveforty and thank you for your workaround which works well.

What I am trying to do is have all the product pages and product lists to just show the price (net of VAT) then, and only then, add the VAT on and disply it during the checkout process?

The reason for this is that many other companies do it this way. At first glance (with the VAT added on at product and product list view) my store looks expensive at first glance compared to my competitors.

So simply have all my products prices show as net UNTIL checkout where the VAT is then calculated and added on.

Regards
Martin

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 7 months later...
  • 3 weeks later...

First off sorry to not replying to everyone, have been busy with several projects that have taken me away for a while.
I'll try and help anyone that I can now

@bigmike
I would suspect that you have the font-size style set to something too big
I recommend something around the 1.0em - 1.2em size

Link to comment
Share on other sites

  • 4 months later...

Thanks for this, it is exactly what I've been after. :rolleyes:

 

I don't understand why the ability to show prices including tax and excluding tax is not availble in PS.

 

We sell b2c, b2b and outside of the EU, so being able to show the prices in this way is necessary.

Link to comment
Share on other sites

  • 3 weeks later...

Dear developers!

 

I'm sorry, but bad English.

Gross - net works, thank you very much.

But the same does not work, "Combination price"

So far, I found that the combination of price, "tools.js" javascript equivalent.

Please help me this!

 

Thank you, respectfully;

pattila

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

Hi,

 

I'm also in need of this. I got fiveforty's fix to work but I also am having trouble getting different product combination prices to display correctly.

 

I am using 1.4.6.2 using the default 1.5 theme.

 

Thanks if anyone can help

Link to comment
Share on other sites

  • 2 years later...

I'm getting back with the same topic but with Presta 1.6.
I want to show both net and gross price for my clients but I'm using net price as a main one.
Can somebody tell me step by step how to make the gross price to be displayed also on a product page?

 

Thanks in advance.

  • Like 1
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...