dms Posted December 26, 2002 Posted December 26, 2002 osc currently applies taxes based on the shipto address, i want tax applied based on the customers billing or home address, not based on where they ship the product to. anyone know of a way to do this? j
dms Posted December 26, 2002 Author Posted December 26, 2002 its a one line change in order.php 'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $shipping_address['entry_country_id'], $shipping_address['entry_zone_id']), you will need to change $shipping_address vars to $customer_shipping vars. after some debugging, i got this to work. j
hobbzilla Posted January 27, 2003 Posted January 27, 2003 NO. Do not do this. You are now totaly disregarding the whole reason for the new checkout procedure (ie. the Ship_to & Bill_to addresses). Personally, I think osc needs to have this as the default. So for you new to the topic: on or about line 213 of catalog/includes/classes/order.php you need to change both 'tax' => ... & 'tax_description' =>.... to be not $shipping_address but rather $billing_address
kickback7 Posted March 28, 2003 Posted March 28, 2003 Huh? In classes/order.php there is nothing on line 213. Can you help me out? :?
cisco_serret Posted March 31, 2003 Posted March 31, 2003 osc currently applies taxes based on the shipto address It does?? On my installation it's putting California sales tax onto every order, even orders outside of California. I'm trying to figure out how to fix it. Is the default for OSC to apply taxes only to the state the product is being shipped to? I wonder how I broke that. - Cisco
cisco_serret Posted March 31, 2003 Posted March 31, 2003 osc currently applies taxes based on the shipto address It does?? On my installation it's putting California sales tax onto every order, even orders outside of California. I'm trying to figure out how to fix it. Is the default for OSC to apply taxes only to the state the product is being shipped to? I wonder how I broke that. - Cisco Ah never mind, found how to fix it in another thread.
Guest Posted March 31, 2003 Posted March 31, 2003 What do we have to change in the code or configuration to charge taxes based on billing address instead of shipping adddress? :?:
halbert Posted June 17, 2003 Posted June 17, 2003 Okay, here's the line you need to change in classes/order.php Original Code (about line 213): $tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . $customer_id . "' and ab.address_book_id = '" . [b]($this->content_type == 'virtual' ? $billto : $sendto)[/b] . "'"); Modified Code: $tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . $customer_id . "' and ab.address_book_id = '" . [b]$billto [/b]. "'");
halbert Posted June 17, 2003 Posted June 17, 2003 crap!! hit the wrong button and there's errors... Original code: $tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . $customer_id . "' and ab.address_book_id = '" . ($this->content_type == 'virtual' ? $billto : $sendto) . "'"); Modified Code: $tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . $customer_id . "' and ab.address_book_id = '" . $billto . "'"); The change is at the end of the line. Somehow this was too easy... :wink: Good luck! -al
AgentNitz Posted June 17, 2003 Posted June 17, 2003 so how does oscommerce know which amount to tax? i.e. if i were to tax items shippined in California only, it would recognize which items were sent to California, and which were sent to other states, and calculate the tax accordingly? or if i wanted to charge tax to several states, how would i tell the program how much to charge for each area? thanks :)
jafarian Posted June 17, 2003 Posted June 17, 2003 should set up tax zones (or states) & tax class (such as taxable goods) & Tax rate in admin>locations/taxes> once set up, if the ship to state is defined in tax zones for all items marked as taxable goods the tax in tax rate is applied to the order For California vendors this works great becuase sales tax needs to be applied based on first use. If my interpritation is correct, then all orders destined for california must pay sales tax. If order is destined out of state, then no sales tax applies.
halbert Posted June 19, 2003 Posted June 19, 2003 You need to set up your tax zones so that OSC knows what tax rate to apply to items being shipped to other states. There's a good write-up on taxes in the forums -- a lot of us Canadians have trouble due to Quebec's rather regressive taxation (provincial tax is charged on federal taxes!). Do a search for "tax AND zone" (no quotes) and see what you get. Here's one link which might cover your question. http://www.oscommerce.com/forums/viewtopic.php...hlight=tax+zone Good luck! -al
Recommended Posts
Archived
This topic is now archived and is closed to further replies.