refacto getTaxCountry which is actually getDeliveryCountry

This commit is contained in:
Etienne Roudeix
2013-12-20 11:13:08 +01:00
parent 63ba1ceeda
commit 4cb8ba704b
5 changed files with 6 additions and 6 deletions

View File

@@ -79,7 +79,7 @@ class Cart extends BaseLoop implements ArraySearchLoopInterface
public function parseResults(LoopResult $loopResult)
{
$taxCountry = TaxEngine::getInstance($this->request->getSession())->getTaxCountry();
$taxCountry = TaxEngine::getInstance($this->request->getSession())->getDeliveryCountry();
foreach($loopResult->getResultDataCollection() as $cartItem) {
$product = $cartItem->getProduct();

View File

@@ -465,7 +465,7 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
return $this->parseComplex($loopResult);
}
$taxCountry = TaxEngine::getInstance($this->request->getSession())->getTaxCountry();
$taxCountry = TaxEngine::getInstance($this->request->getSession())->getDeliveryCountry();
foreach ($loopResult->getResultDataCollection() as $product) {
@@ -983,7 +983,7 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
{
$loopResult = new LoopResult($results);
$taxCountry = TaxEngine::getInstance($this->request->getSession())->getTaxCountry();
$taxCountry = TaxEngine::getInstance($this->request->getSession())->getDeliveryCountry();
foreach ($loopResult->getResultDataCollection() as $product) {

View File

@@ -146,7 +146,7 @@ class ProductSaleElements extends BaseLoop implements PropelSearchLoopInterface
public function parseResults(LoopResult $loopResult)
{
$taxCountry = TaxEngine::getInstance($this->request->getSession())->getTaxCountry();
$taxCountry = TaxEngine::getInstance($this->request->getSession())->getDeliveryCountry();
foreach ($loopResult->getResultDataCollection() as $PSEValue) {
$loopResultRow = new LoopResultRow($PSEValue);

View File

@@ -184,7 +184,7 @@ class DataAccessFunctions extends AbstractSmartyPlugin
if (array_key_exists('currentCountry', self::$dataAccessCache)) {
$taxCountry = self::$dataAccessCache['currentCountry'];
} else {
$taxCountry = TaxEngine::getInstance($this->request->getSession())->getTaxCountry();
$taxCountry = TaxEngine::getInstance($this->request->getSession())->getDeliveryCountry();
self::$dataAccessCache['currentCountry'] = $taxCountry;
}

View File

@@ -104,7 +104,7 @@ class TaxEngine
* @param bool $force result is static cached ; even if a below parameter change between 2 calls, we need to keep coherent results. but you can force it.
* @return null|TaxEngine
*/
public function getTaxCountry($force = false)
public function getDeliveryCountry($force = false)
{
if(false === $force || null === self::$taxCountry) {
/* is there a logged in customer ? */