diff --git a/app/code/core/Mage/Tax/Model/Config.php b/app/code/core/Mage/Tax/Model/Config.php index 4f9bc3f0a9d30..1ff2e1814b26e 100644 --- a/app/code/core/Mage/Tax/Model/Config.php +++ b/app/code/core/Mage/Tax/Model/Config.php @@ -91,6 +91,11 @@ class Mage_Tax_Model_Config */ protected $_needUsePriceExcludeTax = false; + /** + * @var $_priceIncludeTax bool + */ + protected $_priceIncludeTax = null; + /** * Flag which notify what we need use shipping prices exclude tax for calculations * @@ -114,7 +119,23 @@ public function priceIncludesTax($store=null) if ($this->_needUsePriceExcludeTax) { return false; } - return (bool)Mage::getStoreConfig(self::CONFIG_XML_PATH_PRICE_INCLUDES_TAX, $store); + if ($this->_priceIncludeTax === null) { + $this->_priceIncludeTax = (bool)Mage::getStoreConfig( + self::CONFIG_XML_PATH_PRICE_INCLUDES_TAX, + $store + ); + } + return $this->_priceIncludeTax; + } + + /** + * Declare prices type + * @param bool $flag + */ + public function setPriceIncludeTax($flag) + { + $this->_priceIncludeTax = $flag; + return $this; } /**