Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

calculating tax seperately


Recommended Posts

Hi everyone. I am trying to get the products "tax" to be displayed as a seperate item from the product price. I.e:


Sub Total: Products Price (no vat charge here)


Tax Total: Tax at 17.5% (tax according to products price).


How do I go about doing this?. I know which file calls the tax stuff but I am unsure of how to do what I want to do. Can anyone help please?.




Link to comment
Share on other sites

To get Tax to incorporate at end and not to display with prices you need to edit your "application_top.php" in catalog/includes


theres just one little word you have to change.

it's around line 137 you'll see


define('DISPLAY_PRICE_WITH_TAX', true);


just change the true to false and upload the file back to it's directory


Hope this is the answer you needed to solve your problem.



Link to comment
Share on other sites

Just a thought: (My OSC is doing what you're looking for, thought I'm not 100% that this'll do it)


In admin, go to Modules, Order Total and make sure that Display Tax has a value of 'true' under Tax. You can also alter the Sort Order in which these appear on the Order Total page.


My Sort Order is defined as:


Shipping 4

Sub-Total 1

Tax 3

Total 99

Members Discount 2 (post-installation addition)






If your catalog is currently working the tax into the total product price, make sure that includes/application_top.php has the following:


define('DISPLAY_PRICE_WITH_TAX', false); // Display prices with tax (true) or without tax (false)


True is the default and shows price w/ tax figured. false displays the price, adds tax later.


Hope that helps.


Good Luck!



Link to comment
Share on other sites

no guys but thanks for the replys,


I need the tax to be displayed on the What's In My Cart page.


where you have:


remove Qty Product(s) total

1 some name ?price


Sub total: ?price

Tax Total: (I want to have the tax only here!) Not the total price + vat



can this be done?. I know what you guys mean re the other suggestion but thats on the order confirmation page, I need to have it before that page and before the person commits to the order so they can see the price of the item (inclusive of vat in the sub total in the cart) as well as the TAX total under it.






hope someone can help :(

Link to comment
Share on other sites

Hi Mark,


Your in the UK right ?

Are you sure you need to show this in the shopping cart ? I know by law , we have to show / inform our customers that prices are excluding VAT , but I think as long as you show the TAX before they submit their CC details to you, then its fine. It would be a different story if they thought they where being charged 50 quid for a product, and then when they get their CC bill, it showed 50+tax.



Link to comment
Share on other sites

I know the shopping_cart.php in ../includes/classes/ is the file which is used in /catalog/shopping_cart.php because of the $cart variable. This is all actioned from the class directorys file but I am unsure of how to make it work. I did have it working briefly then it borked up and wouldnt claculate properly.


Can anyone help to sort this out?




Link to comment
Share on other sites

I've spent about 4 hours messing about with the TAX information and I can probably give you what you want.




Remove Qty. Product(s) Total


Latex Maids Uniform ?29.74 (?34.95)



Sub-Total: ?34.95

of which is VAT ?5.21

Gravity is a myth - the Earth sucks!

Link to comment
Share on other sites

  • 1 month later...



Your layout is just what I'm looking for. All my prices are inclusive of VAT, All I need to display is the VAT element of the total order price:






Vat Element:?1.75


Could you post your code hacks?


Many Thanks,


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...