Skip to content

Commit

Permalink
Merge pull request #6434 from kpodemski/import-0-qty
Browse files Browse the repository at this point in the history
Allow to import product with quantity set to 0
  • Loading branch information
aleeks committed Sep 24, 2016
2 parents 2e670b4 + 27fc47b commit e79c780
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/admin/AdminImportController.php
Expand Up @@ -2211,7 +2211,7 @@ protected function productImportOne($info, $default_language_id, $id_lang, $forc
}

// This code allows us to set qty and disable depends on stock
if (!$validateOnly && isset($product->quantity) && (int)$product->quantity) {
if (!$validateOnly && isset($product->quantity)) {
// if depends on stock and quantity, add quantity to stock
if ($product->depends_on_stock == 1) {
$stock_manager = StockManagerFactory::getManager();
Expand Down

0 comments on commit e79c780

Please sign in to comment.