Skip to content

Commit 38201e9

Browse files
authored
Merge pull request #31 from Invertus/feature/ean13-npm
feature/ean13-npm
2 parents 859cba3 + 2704c7c commit 38201e9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Adapters/PrestaShopAdapter.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ private function transformProduct(array $product): array
6666
'variants' => [],
6767
];
6868

69+
// Add optional product identifiers
70+
if (isset($product['ean13']) && $product['ean13'] !== null && $product['ean13'] !== '') {
71+
$result['ean13'] = (string) $product['ean13'];
72+
}
73+
if (isset($product['mpn']) && $product['mpn'] !== null && $product['mpn'] !== '') {
74+
$result['mpn'] = (string) $product['mpn'];
75+
}
76+
6977
// Handle localized product name
7078
$this->addLocalizedField($result, 'name', $product['localizedNames'] ?? []);
7179

0 commit comments

Comments
 (0)