# Tax rule

## 11/24/2010 7:32 pm  |  #1 jarrad407561

### Tax rule

I'm trying to setup a tax rule for the Australian GST on my shopping cart, which is rather simple, it is a straight 10% tax on everything.. The problem i'm having is all the products are listed with a tax inclusive price, so I need to work in the following calculations somehow:

Cart sub-total = ((total price of cart) * (1/1.1))
Tax = ((sub-total) * 0.1)
Grand Total = ((sub-total) + (tax))

Where can i enter these calculations in the ecart? or in the code?

Thanks.

## 11/24/2010 10:46 pm  |  #2 jarrad407561

Sorry, i'm not sure i explained that very well..

As all the product prices include tax already, i need the subtotal to display the total amount, minus the tax, and the tax part to show the amount of tax included in the total, and the grand total to show the total..

I cannot find in the code where the "GrandTotal" is calculated..??

Any help would be greatly appreciated,
Thanks

## 11/30/2010 3:21 pm  |  #3 Dani Chankhour

If you open the eCart Object, you will first need to modify the Total Price Calculation. Click on the Calculations Tab and select the Total Price Calculation and modify it to to not include the tax by adding (1/1.1).

And then you will need to add a tax rule. Click on the Tax tab and click the + button. type the name of the tax rule and click the + button. You should select 'total number of unique items in the cart' for your condition and make sure to select > than 0. For the calculation you should select 'based on the cart sub total' and then multiply it by 0.1.

## 11/30/2010 7:19 pm  |  #4 jarrad407561

OK, I've adjusted the TotalPrice calculation to be: [Price] * [Quantity] * (1/1.1)

It is still displaying the total price, and ignoring the 1/1.1

Is there somewhere I can adjust the calculation for the sub total, and/or the grand total?

edit.. It is working now, thanks :)

although i would still prefer to have the calculation in the sub total rather than the item price.. can this be done?

## 11/30/2010 7:27 pm  |  #5 Dani Chankhour

There is no way to directly adjust the cart total. But it seems the cart total should be working correctly. I did an example by adding an item which is \$10 including tax. and then i adjusted the calculation to be [Price] * [Quantity] * (1/1.1) and added the tax rule. And when i add to cart I'm getting sub total of 9.09 and a tax of .91 and a grand total of \$10. Is that the result you are looking for.

## 11/30/2010 11:35 pm  |  #6 jarrad407561

the calculation is working, and it is getting the correct result at the end, although it is display the item cost before tax..
If I can I would like to display the item prices as tax inclusive..

How about I add tax to the prices in the cart and checkout, on the page itself rather than through the shopping cart calculations.. I think this would give the result i'm looking for. I'll let you know if it works..

## 11/30/2010 11:50 pm  |  #7 jarrad407561

That worked..
All I've done is add (* 1.1) to the pages that show the cart.
eg. (\$ShoppingCart, \$ShoppingCart->DisplayInfo("TotalPrice")*1.1)

Now it looks like this:

price quantity price
\$10.00 2 \$20.00

sub-total: \$18.18
tax: \$1.82
grand total: \$20.00

## Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

## Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

## Everything else!

Close Window

Account or customer service questions?

Need technical support?

Content

Layout

Ease of use

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Window

## We were unable to retrieve the attached file

Close Window

### Attach and remove files

• Text Formatting
• Insert Element
• Block Formatting
• Cancel
Close Window

Close Window

#### This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --