[-] BO : fix bug #PSCFV-2188 - imported products with combinations are not added to cart

This commit is contained in:
tDidierjean
2012-05-09 12:02:48 +00:00
parent f80ffe338b
commit e6e88f01cb
+3 -1
View File
@@ -1528,9 +1528,9 @@ class AdminImportControllerCore extends AdminController
} }
} }
// now adds the attributes in the attribute_combination table
if ($id_product_attribute) if ($id_product_attribute)
{ {
// now adds the attributes in the attribute_combination table
if ($id_product_attribute_update) if ($id_product_attribute_update)
{ {
Db::getInstance()->execute(' Db::getInstance()->execute('
@@ -1544,6 +1544,8 @@ class AdminImportControllerCore extends AdminController
INSERT INTO '._DB_PREFIX_.'product_attribute_combination (id_attribute, id_product_attribute) INSERT INTO '._DB_PREFIX_.'product_attribute_combination (id_attribute, id_product_attribute)
VALUES ('.(int)$attribute_to_add.','.(int)$id_product_attribute.')'); VALUES ('.(int)$attribute_to_add.','.(int)$id_product_attribute.')');
} }
StockAvailable::setQuantity($product->id, $id_product_attribute, (int)$info['quantity']);
} }
} }
$this->closeCsvFile($handle); $this->closeCsvFile($handle);