Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jbclaudio/magento2-akeneo-bundle …
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
jbclaudio committed Sep 13, 2024
2 parents cc12e04 + cf7d5f3 commit df870ff
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
8 changes: 0 additions & 8 deletions Helper/Import/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,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) {
Expand All @@ -34,10 +30,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]);
}

Expand Down
9 changes: 0 additions & 9 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,6 @@
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<comment>Set the value on the default store for required attributes that are scopable or localizable. (Default no)</comment>
</field>
<field id="defaultlanguage" translate="label" type="text" sortOrder="155" showInDefault="1" showInWebsite="0"
showInStore="0">
<label>Default language for admin channel</label>
<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'
</comment>
<depends>
<field id="akeneo_connector/justbetter/defaultstorevalues">1</field>
</depends>
</field>
<group id="slack" translate="label" type="text" sortOrder="160" showInDefault="1" showInWebsite="0"
showInStore="0">
<label>Slack Akeneo import notifications</label>
Expand Down

0 comments on commit df870ff

Please sign in to comment.