close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

WI Sales Tax setup

Thread began 12/30/2009 9:01 am by brihod61 | Last modified 3/22/2010 11:31 am by neileisen207079 | 975 views | 6 replies |

brihod61

WI Sales Tax setup

Looking for some help in setting up Sales Tax for state of WI. We have 4 different sales taxes in the state and you must charge sales tax based on purchaser's address. I would like to have the correct sales tax be applied based on the purchaser's zip.
Any incite greatly appreciated

thanks

Sign in to reply to this post

Eric Mittman

Do you know what tax rates apply to the various zip codes? This will be necessary in order to charge the correct tax rate.

The idea is that you would have a set of tax rules. The first condition in the trigger for the tax rule would be that the state selected was WI. The next conditions will be if the entered zip matches a particular set of zip codes. If so then the tax rate for that set of zip codes would be used.

You would then have a different tax rule constructed like this for each potential tax rate.

If you have the info in a table in your db that holds the zip and corresponding tax rate you could do a recordset lookup of the tax rate based on the user submission and store the tax rate in a session variable. You could then have a rule that is triggered on the presence of this session variable, then use the session variable again in the calculation for the rate.

The first path is the static one, the second is the dynamic way to go. Let us know what direction you would like to take and include any questions that you have about the specifics.

Sign in to reply to this post

brihod61

Hi Eric,
I do have my zips an a table, so that part is done.
Table is set up as such

id | zipCode | zipZone | zipRate


zipZone being 1-4 for zone and rate column being the sales tax %

Sign in to reply to this post

Eric Mittman

That is great that you have a table with the info. So the idea is that you will create a recordset on the confirm page. This recordset will be filtered on the posted zip value if the selected state is WI.

To make sure this recordset is only created when the user selects WI you will need to add a custom if statement around the rs, it might look like this depending on your checkout form name for that field:

php:
if(isset($_POST['state_province']) && $_POST['state_province'] == "WI"){

// the recordset goes here
}



Once the recordset is crafted you will add in a set session value server behavior. You give your session variable a name and for the value use the bindings to store the tax rate in this new variable.

Once you have done that you can craft the tax rule for the zip code. Create a new tax rule and for the trigger you will have two conditions. The first condition will be that the session variable exists and the second condition will be that it is not "" or blank.

Then for the calculation portion you will use the subtotal for the entire cart and multiply it by your session variable. You will need to enter your session variable like you would in code:

php:
$_SESSION['tax_rate']



Please post back with any questions that you may have about any part of this.

Sign in to reply to this post

neileisen207079

question

My client also wants the sales tax to be correct for every zip code in NY State, which is what they say they are required to do. I have also downloaded an updated table with sales tax rates in NY...

My question is could I use the existing tax rule, which already has 2 conditions: The first is that the shipping State = NY, and the second that an additional field in my database which tells me if they have a resale certificate on file = N (for no). Couldn't I just use that same rule, only change the calculation to that session variable you are talking about?

Why does the recordset on the page have to be conditional on the proper State being selected if tax is only applied based on that condition already?

Am I making this too confusing? And why isnt everyone worried about this problem? Are most States the same tax for the whole State?

Sign in to reply to this post

Ray BorduinWebAssist

I would add a recordset to the top of the confirm page that filters the a database and returns the correct tax rate based on the entered zip.

Then store that value in the session and use the session variable as the tax rate in your rule.

Sign in to reply to this post

neileisen207079

Thanks

Thanks Ray,
I did that and it worked great. I wouldnt have known how to enter it in the formula for the sales tax rate, so I appreciate this post. Again, I would think everyone would be interested in how to do this, unless everyone is smarter than me and already figured it out on their own. ;)

Sign in to reply to this post

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