Skip to content

Commit b7c821a

Browse files
Removed default value for new connector (#44)
1 parent ef3966d commit b7c821a

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

Helper/Import/Product.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ protected function getColumnsFromResult(array $result, array $keys = []): array
1616
return $mappedResult;
1717
}
1818

19-
$adminChannel = $this->scopeConfig->getValue('akeneo_connector/akeneo_api/admin_channel');
20-
21-
$defaultLanguage = $this->scopeConfig->getValue('akeneo_connector/justbetter/defaultlanguage');
22-
2319
$requiredAttributes = $this->getRequiredAttributes();
2420

2521
foreach ($requiredAttributes as $requiredAttribute) {
@@ -32,10 +28,6 @@ protected function getColumnsFromResult(array $result, array $keys = []): array
3228
continue;
3329
}
3430

35-
if (!array_key_exists($requiredAttribute.'-'.$defaultLanguage.'-'.$adminChannel, $mappedResult) && $defaultLanguage) {
36-
$mappedResult[$requiredAttribute.'-'.$defaultLanguage.'-'.$adminChannel] = $this->getFirstValue($result['values'][$requiredAttribute]);
37-
}
38-
3931
$mappedResult[$requiredAttribute] = $this->getFirstValue($result['values'][$requiredAttribute]);
4032
}
4133

etc/adminhtml/system.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,6 @@
129129
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
130130
<comment>Set the value on the default store for required attributes that are scopable or localizable. (Default no)</comment>
131131
</field>
132-
<field id="defaultlanguage" translate="label" type="text" sortOrder="155" showInDefault="1" showInWebsite="0"
133-
showInStore="0">
134-
<label>Default language for admin channel</label>
135-
<comment>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'
136-
</comment>
137-
<depends>
138-
<field id="akeneo_connector/justbetter/defaultstorevalues">1</field>
139-
</depends>
140-
</field>
141132
<group id="slack" translate="label" type="text" sortOrder="160" showInDefault="1" showInWebsite="0"
142133
showInStore="0">
143134
<label>Slack Akeneo import notifications</label>

0 commit comments

Comments
 (0)