From e37684246659e434f3c188bcd63627dc124c0956 Mon Sep 17 00:00:00 2001 From: boorlyk Date: Fri, 17 Feb 2023 13:10:55 +0200 Subject: [PATCH] [EX-442] [M1] Update SDK Config for Magento Admin Offers Only to Set Region to US - added region=US for admin warranty offer render --- app/code/local/Extend/Warranty/Helper/Connector.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/code/local/Extend/Warranty/Helper/Connector.php b/app/code/local/Extend/Warranty/Helper/Connector.php index 404bbf4..fc8b4e1 100644 --- a/app/code/local/Extend/Warranty/Helper/Connector.php +++ b/app/code/local/Extend/Warranty/Helper/Connector.php @@ -264,9 +264,19 @@ public function getJsonConfig() 'environment' => $this->isLiveMode() ? self::LIVE : self::DEMO, ]; + if($this->isAdmin()){ + $data['region'] = 'US'; + } + return json_encode($data); } + /** + * @return boolean + */ + protected function isAdmin(){ + return Mage::getSingleton('admin/session')->isLoggedIn(); + } /** * @param $sku * @param false $fromAdmin