Skip to content

Commit

Permalink
Merge pull request #83 from magento-nord/merchant_beta
Browse files Browse the repository at this point in the history
 [Merchant beta] [Nord] Bug fix
  • Loading branch information
Korshenko, Olexii(okorshenko) committed Oct 30, 2015
2 parents a1873db + db9565a commit 6007e86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app/code/Magento/CatalogImportExport/Model/Import/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -1958,12 +1958,14 @@ protected function _saveStockItem()
} else {
$row['qty'] = 0;
}
$stockData[] = $row;
if (!isset($stockData[$rowData[self::COL_SKU]])) {
$stockData[$rowData[self::COL_SKU]] = $row;
}
}

// Insert rows
if (!empty($stockData)) {
$this->_connection->insertOnDuplicate($entityTable, $stockData);
$this->_connection->insertOnDuplicate($entityTable, array_values($stockData));
}

if ($productIdsToReindex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function move($fileName, $renameFileOff = false)

$filePath = $this->_directory->getRelativePath($this->getTmpDir() . '/' . $fileName);
$this->_setUploadFile($filePath);
$result = $this->save($this->getDestDir());
$result = $this->save($this->_directory->getAbsolutePath($this->getDestDir()));
$result['name'] = self::getCorrectFileName($result['name']);
return $result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function setUp()
->getMock();

$this->directoryMock = $this->getMockBuilder('\Magento\Framework\Filesystem\Directory\Writer')
->setMethods(['writeFile', 'getRelativePath'])
->setMethods(['writeFile', 'getRelativePath', 'getAbsolutePath'])
->disableOriginalConstructor()
->getMock();

Expand Down

0 comments on commit 6007e86

Please sign in to comment.