Jump to content

US Sales Tax...


Guest

Recommended Posts

I have modded my store for sales tax in two different states. You could easily do 20 if need be... If you need the code just hit me up or reply to this.

Celtic

Link to comment
Share on other sites

All the changes you need to do are in the cart.inc.php file.

I have left code at the end and beginning so you should understand what you need to take out and add. Here is a two state example:

	$view_cart->parse("view_cart.cart_true.step_4");



}



if($basket['conts'] == TRUE) {



	$tax = 0;

	$taxCustomer = 0;

	// work out if customer is obliged to pay tax or not

	if($ccUserData[0]['county'] == "MO"){

 	 // tax customer

 	 $taxCustomer = 1;

  

	

	}

	elseif($ccUserData[0]['county'] == "IA"){

 	 // tax customer

 	 $taxCustomer = 2;

  

	

	}

	

	$totalWeight = "";

	$i = 0;






Just make sure you use the abbreviation for each "county" (this would be the ISO in the admin section).  Also make sure to make each tax customer unique.





Then scroll down in your cart.inc.php and duplicate this next session.  Again I left code at the beginning and end so you should be able to find it easy.




// work out weight

  

  

  // work out tax

  if($config['priceIncTax']==0 && $taxCustomer==1){

  

 	 $lineTax = (7.325 / 100) * $subTotal;

 	 $tax = $lineTax;

  

  }

  

  elseif($config['priceIncTax']==0 && $taxCustomer==2){

  

 	 $lineTax = (5.25 / 100) * $subTotal;

 	 $tax = $lineTax;

  

  }



	}

	

	// calculate shipping when we have reached step4 or over

	

	

  

  $noItems = $cart->noItems();

  $optNo = "";

You will notice I took a bunch of stuff out... I really don't know if you have to take it out... I just figure less work on my server. I think the code is pretty self explanatory but feel free to ask questions.

Celtic

Link to comment
Share on other sites

My curiousity...

I live in the US also. I have a store that forces me by my laws to charge sales tax where my store is located. Store is located in Alabama.

Here is what I am trying to do:

Under Store Config - Apply sales tax only to the following

selected country is United States

selected state is Alabama

and set the tax class at 7%

I set my Locale setting to "USDollars"

include sales tax in price to "YES"

Sales mode to "Individual item per sale"

I ran a shopping test pretending I am a customer and at check out, there are "NO TAXES" displayed.

Could I be setting something up incorrectly or missed something else?

I am using v3

Thanks in advance

Link to comment
Share on other sites

  • 2 months later...

Hi djmceltic,

This looks very promising... Do you think this can be adapted for Canadian (and other) users with their 2 (multiple) taxes? I have posted the specs in this thread

I think we're trying to do the same thing: in our home province we need to charge a higher tax (combination of 2 taxes) than if you are in the other provinces (just 1 tax). Buying from a different country (ie USA) there is no tax.

Will this work with 3.0.4 or 3.0.5?

If you can get this to work flawlessly (with the Admin area etc) think you can make a little fortune since anyone living in a multi tax area will need this. Imagine $20 x ? Why not charge $69.95 since without it no one can use CubeCart to operate a legal online business except for those lucky enough to live in a single tax area. Anyone interested in the challenge to take this up?

If anyone is interested, I'd front the money and ask that I get a portion of the profit. But that said, I think it would be a better incentive to just make one and I'll be your first (out of many) customers.

Please, is any developer listening out there?

Update I have tried this out on 3.0.4 and doesn't seem to work - I get a Parse Error when trying to view the basket. Can a advanced user get this 'type' of thing working out? If you can get it to work, I will gladly buy your cart.inc.php file (send me a URL and I'll test it out)

The noose is starting to tighten....

Update 2 I have put out a formal request in the Mod Request section here

If anyone else out there needs this, please reply to it with your support.

Link to comment
Share on other sites

Guest imacrook

The only way i could get it to work was to get rid of

"$config['priceIncTax']==0 && "

in the second part.

original:

// work out tax

if($config['priceIncTax']==0 && $taxCustomer==1)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...