From b7c821ad586629c942bcb1293a1a3fd793f85202 Mon Sep 17 00:00:00 2001 From: Frits de Vries <110908371+fritsjustbetter@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:11:48 +0200 Subject: [PATCH] Removed default value for new connector (#44) --- Helper/Import/Product.php | 8 -------- etc/adminhtml/system.xml | 9 --------- 2 files changed, 17 deletions(-) diff --git a/Helper/Import/Product.php b/Helper/Import/Product.php index 9ee8813..f9d80cf 100644 --- a/Helper/Import/Product.php +++ b/Helper/Import/Product.php @@ -16,10 +16,6 @@ protected function getColumnsFromResult(array $result, array $keys = []): array return $mappedResult; } - $adminChannel = $this->scopeConfig->getValue('akeneo_connector/akeneo_api/admin_channel'); - - $defaultLanguage = $this->scopeConfig->getValue('akeneo_connector/justbetter/defaultlanguage'); - $requiredAttributes = $this->getRequiredAttributes(); foreach ($requiredAttributes as $requiredAttribute) { @@ -32,10 +28,6 @@ protected function getColumnsFromResult(array $result, array $keys = []): array continue; } - if (!array_key_exists($requiredAttribute.'-'.$defaultLanguage.'-'.$adminChannel, $mappedResult) && $defaultLanguage) { - $mappedResult[$requiredAttribute.'-'.$defaultLanguage.'-'.$adminChannel] = $this->getFirstValue($result['values'][$requiredAttribute]); - } - $mappedResult[$requiredAttribute] = $this->getFirstValue($result['values'][$requiredAttribute]); } diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 05efd4a..4b58a3a 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -129,15 +129,6 @@ Magento\Config\Model\Config\Source\Yesno Set the value on the default store for required attributes that are scopable or localizable. (Default no) - - - If a value of the admin channel is missing, then this setting can be used to map a certain value as your definitive fallback value for a required attribute for example 'nl_NL' - - - 1 - -