I thank you for the quick responce in respect of this problem, but the answer have brough up a few more issues.
The formula stated as stated above:-
([Price] - ([Price] * (isset($_SESSION['Tax'])?$_SESSION['Tax']:"1"))) * [Quantity]
actually reduced the product by 100%.
I have included the following change for those looking at this query.
I have since altered the "1" and tried "0.130434" which is based on a product valued at £100 which already includes VAT/TAX of 15%
i.e. 100% for the Product + 15% for the VAT/TAX = 115%
therefore 100 / 115 = 0.869565.......
then take 1 and subtract the 0.869565
1 - 0869565 = 0.130434 <=== Suggest that this amount is stored at more than 4 decimal places as noticed that I can have a small error of 1p at 4 decimal places ===
([Price] - ([Price] * (isset($_SESSION['Tax'])?$_SESSION['Tax']:"0.130434"))) * [Quantity]
This gives the correct answer of £86.96 net price + VAT/TAX of £13.04 = £100.00
However, my problem is that the formula seems only helpful if I am dealing with one tax rate, i.e. "0.130434" unless I am missing something.
How can I set the $_SESSION['Tax'] so that I can get the relevant tax rate from a database, the tax amount can then change on which country is selected and/or state.
And so that I will not get the error due to the $_SESSION['Tax'] not being set.
Notice: Undefined index: Tax in d:\wamp\www\AB\WA_eCart\AngelBeeStore_PHP.php on line 368
From what you have said earlier I have not set the $_SESSION['Tax'] I guess that the $_SESSION['Tax'] should be setup, not within the calulations but elsewhere normally.
How do I get the TAX from a Database based on a country selected in the purchases profile, which would be far better or if not logged in no tax.
I do appreciate your time and hope that someone can help me in these matters and thanks to DANI for your earlier responce.