use TaxEngine::getDeliveryCountry in delivery loop
This commit is contained in:
@@ -29,6 +29,7 @@ use Thelia\Exception\OrderException;
|
|||||||
use Thelia\Model\CountryQuery;
|
use Thelia\Model\CountryQuery;
|
||||||
use Thelia\Module\BaseModule;
|
use Thelia\Module\BaseModule;
|
||||||
use Thelia\Module\DeliveryModuleInterface;
|
use Thelia\Module\DeliveryModuleInterface;
|
||||||
|
use Thelia\TaxEngine\TaxEngine;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Delivery
|
* Class Delivery
|
||||||
@@ -59,7 +60,7 @@ class Delivery extends BaseSpecificModule
|
|||||||
throw new \InvalidArgumentException('Cannot found country id: `' . $countryId . '` in delivery loop');
|
throw new \InvalidArgumentException('Cannot found country id: `' . $countryId . '` in delivery loop');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$country = CountryQuery::create()->findOneByByDefault(1);
|
$country = TaxEngine::getInstance($this->request->getSession())->getDeliveryCountry();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($loopResult->getResultDataCollection() as $deliveryModule) {
|
foreach ($loopResult->getResultDataCollection() as $deliveryModule) {
|
||||||
|
|||||||
Reference in New Issue
Block a user