if ($billing_state != "AZ" && $shipping_state != "AZ") $tax = 0;
else $tax = ...;
If either the Billing or Shipping address is in the state, we can charge sales tax on taxable items because we handle the items. I suppose this is why it is called Shipping and "Handling". I don't make these rules up, I just make sure they get applied correctly.
I think the following modification will work, but I'd like someone to review who knows OpenCart better than me:
Code: Select all
if ($this->cart->hasShipping()) {
$this->tax->setZone($this->request->post['country_id'], $this->request->post['zone_id']);
}
Code: Select all
if ($this->cart->hasShipping()) {
if ($this->request->post['country_id'] != $this->config->get('config_country_id') || $this->request->post['zone_id'] != $this->config->get('config_zone_id')) {
$this->tax->setZone($this->request->post['country_id'], $this->request->post['zone_id']);
} else {
$this->tax->setZone($this->config->get('config_country_id'), $this->config->get('config_zone_id'));
}
}