close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Tax to only apply to one State

Thread began 5/02/2012 8:58 pm by elewis93815 | Last modified 6/02/2014 1:53 pm by Jason Byrnes | 803 views | 4 replies |

elewis93815

Tax to only apply to one State

Is there a way to have tax only apply to orders coming from one State, e.g. Minnesota, if so, how would I accomplish this task?

Thanks
Jackie

Sign in to reply to this post

Jason ByrnesWebAssist

the billing state is stored in a session named:
eCartCheckoutForm_state_province

on the tax tab, create a new tax rule using the following trigger:


Bassed on Session variable value:
if the session variable 'eCartCheckoutForm_state_province' has a value of 'MN'

this will cause the tax rule to only if the billing state is Minnesota

Sign in to reply to this post

elewis93815

Hi Jason,

That worked like a charm!!!

Thanks,

Erick

Sign in to reply to this post

ed331947

I cannot get it to work. Here is what I've got. In the ecart object file:

function WAEC_eCart1_SalesTax() {
$totalTax = 0;
if (true && (((isset($_SESSION['eCartCheckoutForm_state_province'])?$_SESSION['eCartCheckoutForm_state_province']:"") == "FL"))) {
$totalTax += ($this->GetTaxableTotal() * .06);//Result
}
return WA_eCart_FormatNumber($totalTax, $this->ForceDecimalsC, $this->DecimalPlacesC);
}

Then... on the Checkout Page:

<option value="FL" <?php if (!(strcmp("FL", WA_coalesce(array(WA_getSavedFormValue("CheckoutWizard_Cool_Default","State"),(isset($_GET["invalid"])?ValidatedField("ecarttestconfirmcart","State"):"")))))) {echo "selected=\"selected\"";} ?>>Florida</option>

I know I'm close. By playing around with it a bit, I can get the tax to show either all the time or not at all. Just can't get it to show on the state of FL. Thanks for your help.

Sign in to reply to this post

Jason ByrnesWebAssist

the syntax is different for eCart 6 and will need to be hand coded.

change
if (true && (((isset($_SESSION['eCartCheckoutForm_state_province'])?$_SESSION['eCartCheckoutForm_state_province']:"") == "FL"))) {


to:
if (true && (($this->GetTaxableTotal() > 0) && ((isset($_SESSION['WASF_CheckoutWizard_Cool_Default'])?$_SESSION['WASF_CheckoutWizard_Cool_Default']['State']:"") == "FL"))) {

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