Totally Zenned
- Join Date:
- May 2006
- Location:
- Gardiner, Maine
- Posts:
- 2,383
- Plugin Contributions:
- 7
store pickup not playing nice with custom zone definitions any longer
I upgraded from 1.5.1 to 1.5.4 and store pickup stopped charging sales taxes and it looks like the reason why is a bit different. We created zone definitions for certain counties in Georgia and for a tax exempt zone. The customer chooses the specific zone and all is well on those tax rates - unless they choose store pickup. Then it no longer adds on a tax rate no matter what I do. The session variables are really different though. [shipping_tax_description] => Tax Exempt + Chattooga County Sales Tax (LSE)
Note that tax exempt there - it is the description of the tax exempt tax class which has a rate of 0%. So the question is how can two different tax rates be applied to the store pickup? I gather Tax Exempt is nullifying the actual rate.
This was working on 1.5.1 so there had to be a change in the coding of something since then for this to start happening. I'm thinking that code would be in classes/order.php and I'm thinking this is the code:
if (STORE_PRODUCT_TAX_BASIS == 'Shipping' && stristr($_SESSION['shipping']['id'], 'storepickup') == TRUE)
{
$taxRates = zen_get_multiple_tax_rates($products[$i]['tax_class_id'], STORE_COUNTRY, STORE_ZONE);
$this->products[$index]['tax'] = zen_get_tax_rate($products[$i]['tax_class_id'], STORE_COUNTRY, STORE_ZONE);
} else
{
$taxRates = zen_get_multiple_tax_rates($products[$i]['tax_class_id'], $tax_address->fields['entry_country_id'], $tax_address->fields['entry_zone_id']);
$this->products[$index]['tax'] = zen_get_tax_rate($products[$i]['tax_class_id'], $tax_address->fields['entry_country_id'], $tax_address->fields['entry_zone_id']);
}
So I commented it out and now it all works fine.
The question what is this code supposed to do? It does have that zen_get_multiple_tax_rates in it but why would multiple tax rates be brought into the picture?