Leeb2 Posted February 23, 2006 Posted February 23, 2006 In Pennsylvania, as I understand it, if I will be shipping a taxable product to an address within Pennsylvania, then I collect tax on shipping for that product aswell as on the product itself. So when tax is calculated for an order shipped within Pennsylvania it should calculate the tax on the product amount and on the shipping amount. If the product is not taxable, however, then there is no tax on the shipping either, as I am told. The problem is that the USPS shipping module has a section that says "Use the following tax class on the shipping fee." There is no option for taxing the shipping only on taxable goods. As it is now, shipping within Pennsylvania is taxed for both taxable and non-taxable products. How do people usually set up their store to tax shipping only on taxable goods for states that are like that, as I'm sure this is common?
Guest Posted February 23, 2006 Posted February 23, 2006 you select a tax zone on the shipping module. So if you have taxable goods instead of none there it should add the tax to the shipping amount. Now the actual tax is calculated based on the tax zones setup. So if there is tax for a particular zone on taxable goods it will be added automatically otherwise it wont.
Leeb2 Posted February 23, 2006 Author Posted February 23, 2006 you select a tax zone on the shipping module. So if you have taxable goods instead of none there it should add the tax to the shipping amount. Now the actual tax is calculated based on the tax zones setup. So if there is tax for a particular zone on taxable goods it will be added automatically otherwise it wont. My situation is that for Pennsylvania orders, shipping tax is calculated on all products whether they are taxable or not. Here is the picture:
Guest Posted February 23, 2006 Posted February 23, 2006 Shipping tax (when applicable) is added to the shipping amount and gives the total shipping cost (2.34). But the 0.14 is the products tax only; and looks like 1%. So you are saying the product(s) of this particular order are set with no tax in the catalog?
Leeb2 Posted February 23, 2006 Author Posted February 23, 2006 Shipping tax (when applicable) is added to the shipping amount and gives the total shipping cost (2.34). But the 0.14 is the products tax only; and looks like 1%. So you are saying the product(s) of this particular order are set with no tax in the catalog? No, the 0.14 is the tax on the shipping. The shipping for it should not be taxed. The Pennsylvania sales tax is 6% and the 0.14 is 6% of the shipping for the item.
Guest Posted February 23, 2006 Posted February 23, 2006 Yes it is 6%. then for 6% it should been 0.84 the sales tax. Why is not showing? Check the tax zone settings. Make sure you have a folder like 6Percent and in the details you assign country USA and zone Pennsylvania. Then under the Tax Rates you setup the 6Percent zone with 6% tax rate.
Leeb2 Posted February 23, 2006 Author Posted February 23, 2006 Yes it is 6%. then for 6% it should been 0.84 the sales tax. Why is not showing? Check the tax zone settings. Make sure you have a folder like 6Percent and in the details you assign country USA and zone Pennsylvania. Then under the Tax Rates you setup the 6Percent zone with 6% tax rate. No, the tax is supposed to be 0. This is a non-taxable item. Trust me. The shipping tax shows up for Pennsylvania orders for both taxable and non-taxable items.
Guest Posted February 24, 2006 Posted February 24, 2006 ok lets see the zones. Can you post the following: Tax Zones you have set (folders and details), Tax Rates Tax Classes USPS Tax Zone USPS Shipping Zone and the account you created for the particular order. What was the Country/State. One other thing Does the same thing happens with every shipping module? Just to rule out specifics for USPS.
Leeb2 Posted February 24, 2006 Author Posted February 24, 2006 ok lets see the zones. Can you post the following: Tax Zones you have set (folders and details), Tax Rates Tax Classes USPS Tax Zone USPS Shipping Zone and the account you created for the particular order. What was the Country/State. One other thing Does the same thing happens with every shipping module? Just to rule out specifics for USPS. Here is what I have. One Tax Zone folder called "State Taxes" with one entry with the fields: Country: United States Zone: Pennsylvania One Tax Class called "Taxable Goods" with the fields: Tax Class Title: Taxable Goods Description: The following types of products are included non-food, services, etc One Tax Rate: entry with the fields: Tax Class Title: Taxable Goods Zone: State Taxes Tax Rate: 6.0000% Description: Sales Tax Priority: 0 For the USPS Tax Zone and the USPS Shipping Zone, I am not sure what you mean, but in my USPS shipping module here are these settings: Tax Class: Taxable Goods Shipping Zone: --none-- For the account I created: Country: United States State: Pennsylvania Does the same thing happen for ever shipping module? Yes, it happens with both the USPS module and the Flat Rate mudule. Thank you enigma1.
Guest Posted February 24, 2006 Posted February 24, 2006 Ok, everything looks correct with the settings. Lets see if the tax added comes from the shipping modules or from the main payment files. Open your catalog\includes\modules\shipping\usps.php locate this code and comment it out (or remove it after you do a backup) if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } and see if the tax is still added.
Leeb2 Posted February 24, 2006 Author Posted February 24, 2006 Ok, everything looks correct with the settings. Lets see if the tax added comes from the shipping modules or from the main payment files. Open your catalog\includes\modules\shipping\usps.php locate this code and comment it out (or remove it after you do a backup) if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } and see if the tax is still added. I commented out that code, and the tax is still added the same way. Btw, for now should I uncomment this code or leave it commented out?
Guest Posted February 24, 2006 Posted February 24, 2006 yes restore it, then its probably coming directly from the order totals on shipping. Open catalog\includes\modules\order_total\ot_shipping.php locate this code: if ($GLOBALS[$module]->tax_class > 0) { $shipping_tax = tep_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); $shipping_tax_description = tep_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); $order->info['tax'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); $order->info['tax_groups']["$shipping_tax_description"] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); $order->info['total'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); } comment it out and retry. As I see this code follows the tax zones directly regardless of the items in the cart. So that's the part would probably need modification.
Leeb2 Posted February 24, 2006 Author Posted February 24, 2006 yes restore it, then its probably coming directly from the order totals on shipping. Open catalog\includes\modules\order_total\ot_shipping.php locate this code: if ($GLOBALS[$module]->tax_class > 0) { $shipping_tax = tep_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); $shipping_tax_description = tep_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); $order->info['tax'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); $order->info['tax_groups']["$shipping_tax_description"] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); $order->info['total'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax); } comment it out and retry. As I see this code follows the tax zones directly regardless of the items in the cart. So that's the part would probably need modification. I commented out that code and tried it. It no longer calculates the tax on shipping. What next? :)
Guest Posted February 24, 2006 Posted February 24, 2006 ok now I don't have anything ready and tested and might be a long shot but give it a try. Put back the code of the ot_shipping.php and then replace just the first line from: if ($GLOBALS[$module]->tax_class > 0) { to if ($GLOBALS[$module]->tax_class > 0 && $order->info['tax'] != '0') { if that doesn't work then has to be debugged and perhaps needs something more complex.
Leeb2 Posted February 24, 2006 Author Posted February 24, 2006 ok now I don't have anything ready and tested and might be a long shot but give it a try. Put back the code of the ot_shipping.php and then replace just the first line from: if ($GLOBALS[$module]->tax_class > 0) { to if ($GLOBALS[$module]->tax_class > 0 && $order->info['tax'] != '0') { if that doesn't work then has to be debugged and perhaps needs something more complex. enigma1, this worked perfectly. Thank you very very much. :lol: Wait, I spoke to soon...
Leeb2 Posted February 24, 2006 Author Posted February 24, 2006 ok now I don't have anything ready and tested and might be a long shot but give it a try. Put back the code of the ot_shipping.php and then replace just the first line from: if ($GLOBALS[$module]->tax_class > 0) { to if ($GLOBALS[$module]->tax_class > 0 && $order->info['tax'] != '0') { if that doesn't work then has to be debugged and perhaps needs something more complex. Ok, now it no longer taxes the shipping on an order that is a non-taxable item. But when there is an order with one taxable item and one non-taxable item, it taxes the total shipping cost of both of those together, but I'm guessing it is supposed to do that, right? If that is the case then this worked perfectly. Thank you.
Guest Posted February 24, 2006 Posted February 24, 2006 yes as long as it detect an item that is taxable it applies the shipping tax. You could check the state (and/or counties) sites if they have a document that clarifies what should happen in such cases. It's easier in Oregon you know ? :D
Leeb2 Posted April 2, 2006 Author Posted April 2, 2006 yes as long as it detect an item that is taxable it applies the shipping tax. You could check the state (and/or counties) sites if they have a document that clarifies what should happen in such cases. It's easier in Oregon you know ? :D I got a problem left that relates to the one that you found the fix for. The one that you found the fix for was that tax on shipping was calculated for both taxable and non-taxable goods. The problem that is left is that tax is calculated on taxable goods on orders outside of Pennsylvania. Tax on the product is calculated, but not on the shipping cost. I want to fix it so orders outside of Pennsylvania aren't taxed. :huh:
Guest Posted April 2, 2006 Posted April 2, 2006 each shipping module also checks for a tax class. When assigned from the shipping configuration it will add it. So now you will have to modify the shipping modules you're using. There is a line of code inside each module in catalog\includes\modules\shipping like if ($this->tax_class > 0) { so try doing something similar if ($this->tax_class > 0 && $order->info['tax'] != '0') { see if you get around it.
Leeb2 Posted April 3, 2006 Author Posted April 3, 2006 each shipping module also checks for a tax class. When assigned from the shipping configuration it will add it. So now you will have to modify the shipping modules you're using. There is a line of code inside each module in catalog\includes\modules\shipping like if ($this->tax_class > 0) { so try doing something similar if ($this->tax_class > 0 && $order->info['tax'] != '0') { see if you get around it. enigma1, thank you. I discovered however that the problem was with the item I was using as a test. It is working now.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.