[-] WS: Sanity check before creating packs
As it is before this commit, every product that is created from the schema without removing the empty bundle item in the schema will become a pack containing one broken item. Sorry, this bug was introduced by my previous pull request.
This commit is contained in:
+2
-1
@@ -5377,7 +5377,8 @@ class ProductCore extends ObjectModel
|
||||
Pack::deleteItems($this->id);
|
||||
|
||||
foreach ($items as $item)
|
||||
Pack::addItem($this->id, (int)$item['id'], (int)$item['quantity']);
|
||||
if((int)$item['id'] > 0)
|
||||
Pack::addItem($this->id, (int)$item['id'], (int)$item['quantity']);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user