Jump to content

Unit Price tax included on the shopping cart summary?


Recommended Posts

I would like my Unit Price to be with the tax included.

for example:

a unit might costs €4,18 before tax and €5 after tax.
on the shopping cart summary it shows 4.18€ for the unit price and 5€ for the total. if
order 2 of the same it says €10 for the total and of course the unit price stay the same.
i would prefer to just show the customer the unit price after tax. it's cleaner and looks
nicer. no need for those details. if they're interested they'll see these details on the invoice.

Is there a setting for this in the back office?

thanks

15940_Zy5OEH2Dl8vx7sPzLGBS_t

Link to comment
Share on other sites

Unfortunately, there is no option in the Back Office to change this. You must modify shopping-cart-product-line.tpl in your theme directory and change line 19 from:

           {convertPrice price=$product.price} {l s='-Tx'}



to:

           {convertPrice price=$product.price_wt} {l s='+Tx'}

Link to comment
Share on other sites

That variable contains whatever you have set under Preferences > Products in the "Price display" dropdown. If you selected "Tax included**, the value is 0. If you selected "Tax excluded***", the value is 1. If you selected "Both excluded and included tax", the value is 2. So the code you mention means "if you selected Both excluded and included tax". However, you don't need to mess around with any of that code to fix to change the unit price to tax included.

Link to comment
Share on other sites

ah cool. man i almost had it. i figured out that it's the shopping-cart-product-line.tpl.
and that the code i need to change is here:



{convertPrice price=$product.price} {l s='-Tx'}



i tried this:

{$product.price_wt}

but just got 0. i don't really understand the "convertPrice price=" part of the code. as i said i'm no php guy, but it's fun to learn.

thanks for your help. it's much appreciated.

james

Link to comment
Share on other sites

That's odd. I just tested price_wt on my site and it displayed the price with tax instead of without tax. The code {convertPrice price=$product.price_wt} calls the convertPrice function in classes/Tools.php with $product.price_wt as the price parameter. The function adds the currently selected currency before the product price.

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