How to show Tax in osCommerce

By | July 5, 2008

Tax is complicated!  osCommerce makes it relatively easy to set up, but there are some nuances that you need to be aware of…

I suspect that most stores will want to show prices with taxes included, in other words, show a £99.99 (incl tax), £85.10 (excl tax) as £99.99.  The example assume a UK pounds product, based on a 17.5% tax rate (which is the UK rate of VAT).

Creating  a Tax Zone – let’s look at how to set this up.

Step 1:  Create a UK Tax Zone in Locations/Taxes > Tax Zones

Step 2: Insert the UK and all the other countries that you need to charge tax to inside the Tax Zone.  This is done by selecting the Tax Zone you set up in step 1 and pressing “insert”.  Select all the countries you need to.

Step 3:  Create a Tax Class – this is usually already done in most osCommerce stores – it’s called “Taxable Goods”

Step 4: Set up a 17.5% tax rate and select the Zone you made in Step 1.

Step 5:  If you wish to charge shipping with Tax, you will need to update each shipping module that you use!

Done!  Now you need to update all your products to use the “Tax Class” you just made.  This is done using the dropdown slection near the price input fields.

In Configuration > My Store > Display Prices with Tax, set this to true.  This will show your product prices INCLUSIVE of tax.  This will be done throughout the store, including in the checkout procedure.  This is where many Store owners don’t understand the tax calculations…so let’s look at an example;

Sub Total:  £450.00
Postage:  £32.00
Tax:  £71.79
Total: £482.00

As you can see, the look of this is all wrong!  The tax amount is NOT 17.5% of the total!  It is actually about 14.9% – this is because all the prices are inclusive of Tax, thus:

Sub Total:  £450.00 (includes tax of £67.02)
Postage:  £32.00 (includes tax of £4.77)
Tax:  £71.79 (is £67.02 + £4.77)
Total: £482.00 (is £450.00 + £32.00)

Now, if we look at setting Configuration > My Store > Display Prices with Tax, to false, the display will look like this:

Sub Total:  £382.98
Postage:  £27.23
Tax:  £71.79
Total: £482.00

This is much easier to understand for the layman – and most people buying from your store really will have no idea how tax is worked out!  However, it’s always best to show prices including Tax (unless of course, you have no tax to charge, or you sell business to business).


If you ever have to explain your tax charges to anyone, and you Display Prices with Tax “true”, then you need to try to make your buyers understand that the product prices that they see INCLUDE tax and that they should not base any tax implications on the final total that they are charged.

8 thoughts on “How to show Tax in osCommerce

  1. Arun Sreekumar

    Thanks for this information and it’s working pretty gud for in mt OSC. I want to know if there in any option to display the price with tax in the product listing page.

  2. Gary Post author

    Hi Arun – if you have the prices set to show tax, then they should show in the product listing page, unless your codebase has changed significantly (eg you are using a badly coded template)…

  3. Brian

    Is there any way to turn all the taxable goods choices without going to each item and selecting it?

  4. Gary Post author

    Hi Brian, you can hit every product in one go directly using phpmyadmin.

  5. Brian

    Thanks but way over my head. I am not a computer guy but I am having to learn.

  6. Gary Post author

    Hi Brian. Using phpmyadmin is a way to access your database directly rather than through the osc admin area. Your hosting account should have phpmyadmin as standard. Note that it is very easy to nuke your database, and if you do that (and you don’t have a backup) it is gone for ever, so always be careful with phpmyadmin.

    What you basically need to do is update the product TABLE, and the products_tax_class_id to match the ID of the tax class you want to apply to the products. If you are not 100% certain how/what to do, I suggest you contact me (email address is up there ^^) as I can do this for a small “beer” fee for you. And then you have no worries about destroying your Database.

  7. Gary Post author

    Your takes are being compunded. You have IVA set at 5 lots of 10% and 1 lot of 8%.

    32.95 x 10% = 3.295
    32.95 x 8% = 2.636

    5 x 3.295 = 16.475
    1 x 2.636 = 2.636

    32.95 + 16.475 + 2.636 = 52.061

    This is the same bug I reported at – so you should log into the forum and reply to that bug report stating that you are seeing the same effect.

Leave a Reply

Your email address will not be published.