Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development

This commit is contained in:
Gregory Roussac committed 2013-01-07 16:56:04 +01:00
commit 1f7ab4f172
1 file changed
+8 -3
+8 -3
View File
@@ -64,13 +64,18 @@ class TaxRulesTaxManagerCore implements TaxManagerInterface
*/ */
public function getTaxCalculator() public function getTaxCalculator()
{ {
static $tax_enabled = null;
if (isset($this->tax_calculator)) if (isset($this->tax_calculator))
return $this->tax_calculator; return $this->tax_calculator;
if ($tax_enabled === null)
$tax_enabled = Configuration::get('PS_TAX');
if (!$tax_enabled)
return new TaxCalculator(array());
$taxes = array(); $taxes = array();
if (!Configuration::get('PS_TAX'))
return new TaxCalculator($taxes);
$postcode = 0; $postcode = 0;
if (!empty($this->address->postcode)) if (!empty($this->address->postcode))
$postcode = $this->address->postcode; $postcode = $this->address->postcode;