diff --git a/core/lib/Thelia/Coupon/BaseFacade.php b/core/lib/Thelia/Coupon/BaseFacade.php index 5794df673..6df4675ea 100644 --- a/core/lib/Thelia/Coupon/BaseFacade.php +++ b/core/lib/Thelia/Coupon/BaseFacade.php @@ -21,6 +21,7 @@ use Thelia\Core\HttpFoundation\Request; use Thelia\Core\Template\ParserInterface; use Thelia\Core\Template\TemplateHelper; use Thelia\Model\AddressQuery; +use Thelia\Model\Country; use Thelia\Model\Coupon; use Thelia\Model\CouponQuery; use Thelia\Cart\CartTrait; @@ -149,6 +150,15 @@ class BaseFacade implements FacadeInterface return $total; } + + /** + * @return Country the delivery country + */ + public function getDeliveryCountry() + { + return $this->getContainer()->get('thelia.taxEngine')->getDeliveryCountry(); + } + /** * Return the Checkout currency EUR|USD * diff --git a/core/lib/Thelia/Coupon/FacadeInterface.php b/core/lib/Thelia/Coupon/FacadeInterface.php index 8a4d004a3..2201dfb69 100644 --- a/core/lib/Thelia/Coupon/FacadeInterface.php +++ b/core/lib/Thelia/Coupon/FacadeInterface.php @@ -18,6 +18,7 @@ use Symfony\Component\Translation\TranslatorInterface; use Thelia\Condition\ConditionEvaluator; use Thelia\Core\HttpFoundation\Request; use Thelia\Core\Template\ParserInterface; +use Thelia\Model\Country; use Thelia\Model\Coupon; /** @@ -51,6 +52,11 @@ interface FacadeInterface */ public function getDeliveryAddress(); + /** + * @return Country the delivery country + */ + public function getDeliveryCountry(); + /** * Return an Customer a CouponManager can process *