From 0a093ac60ea37c49f29e2a227cf0d9d40a70fd13 Mon Sep 17 00:00:00 2001 From: Richard Sisco Date: Mon, 5 Mar 2018 11:12:16 -0600 Subject: [PATCH 1/2] #AVS-421_78 - Add scope to company code retrieval --- Helper/Config.php | 5 +++-- Observer/ConfigSaveObserver.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Helper/Config.php b/Helper/Config.php index 4553918d..48d870ba 100644 --- a/Helper/Config.php +++ b/Helper/Config.php @@ -591,13 +591,14 @@ public function getDevelopmentLicenseKey($store, $scopeType = ScopeInterface::SC * Get development company code from config * * @param $store + * @param $scopeType * @return string */ - public function getDevelopmentCompanyCode($store) + public function getDevelopmentCompanyCode($store, $scopeType = ScopeInterface::SCOPE_STORE) { return (string)$this->scopeConfig->getValue( self::XML_PATH_AVATAX_DEVELOPMENT_COMPANY_CODE, - ScopeInterface::SCOPE_STORE, + $scopeType, $store ); } diff --git a/Observer/ConfigSaveObserver.php b/Observer/ConfigSaveObserver.php index f3aa4678..10323f12 100644 --- a/Observer/ConfigSaveObserver.php +++ b/Observer/ConfigSaveObserver.php @@ -188,7 +188,7 @@ protected function checkCredentialsForMode($scopeId, $scopeType, $mode) if ( $this->config->getAccountNumber($scopeId, $scopeType) != '' && $this->config->getLicenseKey($scopeId, $scopeType) != '' - && $this->config->getCompanyCode($scopeId) != '' + && $this->config->getCompanyCode($scopeId, $scopeType) != '' ) { return true; } @@ -196,7 +196,7 @@ protected function checkCredentialsForMode($scopeId, $scopeType, $mode) if ( $this->config->getDevelopmentAccountNumber($scopeId, $scopeType) != '' && $this->config->getDevelopmentLicenseKey($scopeId, $scopeType) != '' - && $this->config->getDevelopmentCompanyCode($scopeId) != '' + && $this->config->getDevelopmentCompanyCode($scopeId, $scopeType) != '' ) { return true; } From cf7a931055571e3aac02a2f5130a1c7d1c2fc2f4 Mon Sep 17 00:00:00 2001 From: Richard Sisco Date: Mon, 5 Mar 2018 11:23:08 -0600 Subject: [PATCH 2/2] - Update changelog and version number --- CHANGELOG.md | 4 ++++ Framework/AppInterface.php | 2 +- composer.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d29374f1..c17871ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 1.3.5 (2018-03-05) + +* Fix issue where sometimes the connection credentials fail when assigned at website level [#112](https://github.com/classyllama/ClassyLlama_AvaTax/issues/112) + ### 1.3.4 (2018-02-14) * Fix problem where customer can't save edited address in address book [#110](https://github.com/classyllama/ClassyLlama_AvaTax/issues/110) diff --git a/Framework/AppInterface.php b/Framework/AppInterface.php index 4d78ccdd..37ca3557 100644 --- a/Framework/AppInterface.php +++ b/Framework/AppInterface.php @@ -20,5 +20,5 @@ interface AppInterface /** * If this is updated it must also be updated in composer.json */ - const APP_VERSION = '1.3.4'; + const APP_VERSION = '1.3.5'; } diff --git a/composer.json b/composer.json index 1919bcd3..e535f38b 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "classyllama/module-avatax", "type": "magento2-module", - "version": "1.3.4", + "version": "1.3.5", "license": "OSL-3.0", "require": { "magento/framework": "^100.1.0|101.0.*",