k, currently testing this as a final fix.
n.b. this applies to 1.3.9b code only
in includes/functions/functions_taxes.php
the final function should be zen_get_all_tax_descriptions
you should replace that function with the code below
PHP Code:
function zen_get_all_tax_descriptions($country_id = -1, $zone_id = -1)
{
global $db;
if ( ($country_id == -1) && ($zone_id == -1) ) {
if (isset($_SESSION['customer_id'])) {
$country_id = $_SESSION['customer_country_id'];
$zone_id = $_SESSION['customer_zone_id'];
} else {
$country_id = STORE_COUNTRY;
$zone_id = STORE_ZONE;
}
}
$sql = "select tr.*
from (" . TABLE_TAX_RATES . " tr
left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id)
left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) )
where (za.zone_country_id is null
or za.zone_country_id = 0
or za.zone_country_id = '" . (int)$country_id . "')
and (za.zone_id is null
or za.zone_id = 0
or za.zone_id = '" . (int)$zone_id . "')";
$result = $db->Execute($sql);
$taxDescriptions =array();
while (!$result->EOF)
{
$taxDescriptions[] = $result->fields['tax_description'];
$result->moveNext();
}
return $taxDescriptions;
}
Bookmarks