Tax the shipping charges in PS3
We are located in Texas and have to tax the shipping charges for any shipments to a Texas address. In sandbox mode, the shipping is not taxed. How can I fix this?
Jan
We are located in Texas and have to tax the shipping charges for any shipments to a Texas address. In sandbox mode, the shipping is not taxed. How can I fix this?
Jan
in the WA_eCart/WA_Store_Cart_PHP.php file, find the following line:
$this->ShippingIsTaxed = false;
and change it to:
$this->ShippingIsTaxed = true;
I see the line of code – but, will this make the shipping for ALL shipments, including those going to out-of-state addresses taxable? If so, that's not what we need to do. We only need to tax the shipping when the shipment is going to an address inside Texas.
to make this apply to Texas only,
if(isset($_SESSION["eCartCheckoutForm_shipping_state_province"]) && $_SESSION["eCartCheckoutForm_shipping_state_province"] == "TX") {
$this->ShippingIsTaxed = true;
} else {
$this->ShippingIsTaxed = false;
}
I apologize - I'm not very familar with coding.
Is this the correct node?
If so, where should I insert the "if" clause
//start node
function DefineRules() {
$this->Discounts = array();
$this->Charges = array();
$this->Tax = array();
$this->Shipping = array();
$this->ShippingIsTaxed = false;
//Discounts
$this->Discounts[] = new WA_eCart_Rule(urldecode("CouponOnTotal"), true, "WAEC_WA_Store_Cart_CouponOnTotal");
//Charges
//Tax
$this->Tax[] = new WA_eCart_Rule(urldecode("Sales%20Tax"), true, "WAEC_WA_Store_Cart_SalesTax");
//Shipping
$this->Shipping[] = new WA_eCart_Rule(urldecode("USPS%20Shipping"), true, "WAEC_WA_Store_Cart_USPSShipping");
$this->Shipping[] = new WA_eCart_Rule(urldecode("FedEx%20Shipping"), true, "WAEC_WA_Store_Cart_FedExShipping");
$this->Shipping[] = new WA_eCart_Rule(urldecode("UPS%20Shipping"), true, "WAEC_WA_Store_Cart_UPSShipping");
}
//end node
find this line of code:
$this->ShippingIsTaxed = false;
and change it to:
if(isset($_SESSION["eCartCheckoutForm_shipping_state_province"]) && $_SESSION["eCartCheckoutForm_shipping_state_province"] == "TX") {
$this->ShippingIsTaxed = true;
} else {
$this->ShippingIsTaxed = false;
}
I changed the code as directed and it now looks like this
$this->Shipping = array();
if(isset($_SESSION["eCartCheckoutForm_shipping_state_province"]) && $_SESSION["eCartCheckoutForm_shipping_state_province"] == "TX") {
$this->ShippingIsTaxed = true;
} else {
$this->ShippingIsTaxed = false;
}
The cart is still not taxing the shipping.
Jan
make sure that the WA_eCart/WA_Store_Cart_PHP.php file is uploaded to the server.
if it is not taxing the shipping, this updated file is most likely not uploaded to the server correctly.
I tested this change on my local system and it functions correctly.
I just tried the same fix and can not get it to work. All my products are set to ignore carrier shipping rules and instead are using "shipping and handling" and "additional items" to charge shipping. do i need to change code somewhere else as well?
If you send me FTP access and steps to reproduce I can debug it and see what is wrong.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.