close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

wrong tax calculation

Thread began 3/18/2010 2:17 pm by Miguel | Last modified 3/19/2010 5:41 pm by Eric Mittman | 871 views | 5 replies |

Miguel

wrong tax calculation

Hello again after struggling with paypal and all the stuff i finaly got everything working transactions are now working but i have notice that the tax are been calculated wrong,

i have added a 1$ product to test now reall purshase

with it im getting the following on my confirm page:
Name Price Quantity Total Test $1.00 1 $1.00 Order Summary

Sub-total $1.00 Shipping $11.20 Tax $5.60 Total: $17.80

Now the only tax rule on my cart was made when i used the checkout wizard and its set up like this (please view image tax1.jpg attached to this post) i also added the shipping rule made by the wizard file shipping-1.jpg,

i called fedex cause i thought their api was calculating the tax value, and they tell us their api does not do tax calculation so now why is it calculating that tax, when i set up everything with the wizard i placed for fedex miami FL and also 0 value declare example, i just cant see from where its getting those values for tax, specially that we are in florida wich tax is 7%, am i missing some settings?:

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
//WA eCart (Copyright 2007, WebAssist)
//WA eCart FedEx Shipping - FedEx
$Shipping_SuccessURL = "";
$Shipping_FailureURL = "shipping_failure.php";
$Shipping_Packaging = 0;
$Shipping_PackageArray = array();
$Shipping_PackageIndex = 0;
$Shipping_Counter = 0;
$Shipping_Parameters = array();
$Shipping_Parameters["FedExAccount"] = "xxxxxxxxxx";
$Shipping_Parameters["FedExMeter"] = "xxxxxxxxx";
$Shipping_Parameters["FedExServer"] = "https://gateway.fedex.com:443/GatewayDC";
$Shipping_Parameters["CarrierCode"] = "FDXG";
$Shipping_Parameters["FedExService"] = "FEDEXGROUND";
$Shipping_Parameters["FedExPickUp"] = "REGULARPICKUP";
$Shipping_Parameters["ReturnShipmentIndicator"] = "none";
$Shipping_Parameters["ShipperState"] = "FL";
$Shipping_Parameters["ShipperZip"] = "33186";
$Shipping_Parameters["ShipperCountry"] = "US";
$Shipping_Parameters["ShiptoState"] = "".((isset($_POST["shipping_state_province"]))?$_POST["shipping_state_province"]:"") ."";
$Shipping_Parameters["ShiptoZip"] = "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."";
$Shipping_Parameters["ShiptoCountry"] = "".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."";
while (($Shipping_Packaging == 1 && !$SofiShop->EOF()) || ($Shipping_Packaging == 0 && $Shipping_Counter == 0)) {
if (WA_eCart_FedEx_IsTrueValue("true")) {
$Shipping_PackageArray[] = array();
$Shipping_PackageIndex = sizeof($Shipping_PackageArray)-1;
$Shipping_PackageArray[$Shipping_PackageIndex]["eCart_Quantity"] = (($Shipping_Packaging == 1)?$SofiShop->DisplayInfo("Quantity"):1);
$Shipping_PackageArray[$Shipping_PackageIndex]["IsPackage"] = "true";
$Shipping_PackageArray[$Shipping_PackageIndex]["Quantity"] = "1";
$Shipping_PackageArray[$Shipping_PackageIndex]["DeclaredValue"] = "0";
$Shipping_PackageArray[$Shipping_PackageIndex]["WeightUnits"] = "LBS";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWeight"] = "".$SofiShop->DisplayInfo("TotalWeight") ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "YOURPACKAGING";
$Shipping_PackageArray[$Shipping_PackageIndex]["SizeUnits"] = "IN";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageLength"] = "".$SofiShop->DisplayInfo("length") ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWidth"] = "".$SofiShop->DisplayInfo("width") ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageHeight"] = "".$SofiShop->DisplayInfo("height") ."";
//Special Services
$Shipping_PackageArray[$Shipping_PackageIndex]["RESIDENTIALDELIVERY"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["RESIDENTIALPICKUP"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["INSIDEDELIVERY"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["INSIDEPICKUP"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["SATURDAYDELIVERY"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["SATURDAYPICKUP"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["HOLDATLOCATION"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["DRYICE"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["DANGEROUSGOODS"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["HOMEDELIVERYTYPE"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["SIGNATUREREQUIRED"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["AOD"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["AUTOPOD"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["NONSTANDARDPACKAGE"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["COD"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["CODCOLLECTAMOUNT"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["CODCOLLECTTYPE"] = "";
}
$Shipping_Counter++;
if ($Shipping_Packaging == 1) $SofiShop->MoveNext();
}
if ($Shipping_Packaging == 1) $SofiShop->MoveFirst();
$Shipping_Result = WA_eCart_FedEx_GetRateQuote($SofiShop, $Shipping_Parameters, $Shipping_PackageArray);
if ($Shipping_Result && $Shipping_SuccessURL != "")
$SofiShop->redirStr = $Shipping_SuccessURL;
else if (!$Shipping_Result && $Shipping_FailureURL != "") {
Header("Location: " . $Shipping_FailureURL); exit;
}
}
else if (!isset($_SESSION["SofiShop_FedEx_Success"])) {
WA_eCart_FedEx_SetSessionDefaults($SofiShop);
}
?>

need help again sorry :confused: just at the final stage of this.

Sign in to reply to this post

Eric Mittman

The tax rule you have an image for is not correct, it is trying to charge you an amount that is equal to the shipping charge that has been returned. What are the tax rules that you have present in your cart and how are all of them defined? If you can post back with a copy of your WA_eCart > WA_your cart name_php.php file this will help us to understand the current tax and charge rules that you have in place.

Sign in to reply to this post

Miguel

ok i changed that rule by placing times and 0.07, not sure if thats correct if some one buys from another state difrent from florida will be charged that tax i guess, also attached the file you ask me for

Attached Files
Shop_PHP.zip
Sign in to reply to this post

Eric Mittman

Ok, I can see what is going on here. In your cart file you have two shipping rules and one tax rule. The problem is that your tax rule is being based on the shipping quote value. You need to base this on a percent of the carts total, not the shipping quote.

You have two fedex shipping rules. They are both set to the shipping quote value, so in effect you are doubling the shipping cost. You should remove one of these shipping rules and update the tax rule, it should then be charging the correct amount for these.

Sign in to reply to this post

Miguel

Thank you i also added on tax to calculate at 0.07 for the 7% of florida tax but any purshase gets calculated with that for now ill keep it but is there any recipie or instructions to make it charge only to the florida buyers and for the rest to ignore tax?

Sign in to reply to this post

Eric Mittman

The only guide that we have for this is an older one that I feel is too outdated to be useful to you in your current setup.

The idea is pretty straight forward though. If you are wanting to tax only for FL then you need to first set a session variable if the user selects FL. In this session variable you can set it to any value you would like.

The next part is to add in your tax rule, in here when you set it up you will select based on session variable exists, then select the newly created session, then add in another condition to the trigger that says if session variable has a particular value, then enter the value that you assigned to the variable.

This should allow you to charge the tax rate for your state, just use based on cart subtotal and times 0.07. Let me know if you have any trouble with this and post back with a copy of your confirm page and we can show you how this needs to be setup.

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