diff --git a/CHANGELOG.md b/CHANGELOG.md index 71414d6..5b233a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGE LOG +## 2.4.6 +- Bugfix | change multiple skus + ## 2.4.5 - remove support magento 2.2 --- diff --git a/Model/ProductManagement.php b/Model/ProductManagement.php index 31ed054..02c7b6e 100644 --- a/Model/ProductManagement.php +++ b/Model/ProductManagement.php @@ -106,14 +106,14 @@ public function updateSkus($jsonData) $rows = $this->jsonHelper->jsonDecode($jsonData); $result = array(); - $product = $this->productFactory->create(); - + foreach($rows as $row) { $productId = $row['product_id']; $sku = $row['sku']; $changed = false; if (!empty($sku)) { + $product = $this->productFactory->create(); $product->setData('store_id', \Magento\Store\Model\Store::DEFAULT_STORE_ID); $product->load($productId); diff --git a/composer.json b/composer.json index 69fa968..7314583 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name" : "cobbyio/cobby-connector-magento2", "description" : "This extension for Magento 2 provides a direct integration of the cobby management methods to your Magento 2 shop.", - "version" : "2.4.5", + "version" : "2.4.6", "type" : "magento2-module", "require": { "magento/framework": "^102.0|^103.0|^104.0",