From 67d0101dbe4e4f830de48b528c3319c5f517ca39 Mon Sep 17 00:00:00 2001 From: Etienne Roudeix Date: Fri, 20 Dec 2013 11:14:04 +0100 Subject: [PATCH] use TaxEngine::getDeliveryCountry in delivery loop --- core/lib/Thelia/Core/Template/Loop/Delivery.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/lib/Thelia/Core/Template/Loop/Delivery.php b/core/lib/Thelia/Core/Template/Loop/Delivery.php index 5211d3a79..f671f1ca9 100644 --- a/core/lib/Thelia/Core/Template/Loop/Delivery.php +++ b/core/lib/Thelia/Core/Template/Loop/Delivery.php @@ -29,6 +29,7 @@ use Thelia\Exception\OrderException; use Thelia\Model\CountryQuery; use Thelia\Module\BaseModule; use Thelia\Module\DeliveryModuleInterface; +use Thelia\TaxEngine\TaxEngine; /** * Class Delivery @@ -59,7 +60,7 @@ class Delivery extends BaseSpecificModule throw new \InvalidArgumentException('Cannot found country id: `' . $countryId . '` in delivery loop'); } } else { - $country = CountryQuery::create()->findOneByByDefault(1); + $country = TaxEngine::getInstance($this->request->getSession())->getDeliveryCountry(); } foreach ($loopResult->getResultDataCollection() as $deliveryModule) {