close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

...Taxes depending on Zip Codes /Check out setup...

Thread began 5/18/2010 3:48 am by Bruce | Last modified 11/04/2011 11:30 am by Bruce | 3521 views | 40 replies

Jason ByrnesWebAssist

To be fair, what you are asking is not a standard request, and I don't believe you will find any cart system that will support this sort of tax calculation out of the box.


To accomplish this is going to take 4 main steps:
1) Create a tax rate table
2) Create a recordset to lookup the tax rate
3) Add a Set Session value to store the tax rate
4) Set the tax calculation to use the session value.

1) I think if you can break the tax rates up by city instead of zip code it would definitely simplify things, but either way, I think this solution is going to call for a new database table to hold the tax rate - zip code or city relation:
taxID - Primary Key column - Auto Number
TaxRate - Number - holds the tax rate
zipCode - varchar - holds the zip code - could be state if you decide to go that way instead


You will need to enter all of the zip codes and the corresponding tax rates into this table.

2) Then on the confirm page, create a recordset to lookup the tax rate from the database for the zip code that was entered.

To create the recordset, click the plus button on the server behaviors panel.

Set the name of the recordset to "taxLookup"

select the database connection to use, select the taxRate table.

Leave the recordset window in simple view.

In the Filtering section, Select the zipCode column set the comparison to '='
set the variable type to Form Variable and enter 'postcode' for the variable name.

3) Once the recordset is created, add the set session value server behavior to the confirm page.

Click the plus button on the server behavior panel and select eCart -> General -> Set Session Value

For the trigger select "Recordset taxLookup is not empty"

set the name to "taxRate"

click the lightning bolt next to value and select the taxRate column from the taxLookup recordset.

4) Now to create the tax calculation.

In the eCart object, on the tax tab, click the plus button to create a new tax rule.

For the trigger select Session variable Exists:
if the Session Variable 'taxRate' exists

for the calculation use Based on carts taxable subtotal:
Taxable subtotal 'Times' '$_SESSION['taxRate']'

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

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 Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

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

Uploading file...