// The END

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17357 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-09-13 18:20:47 +00:00
parent c77fddce5d
commit 613196299c
5 changed files with 4999 additions and 46 deletions
@@ -114,18 +114,18 @@ class AdminAttributeGeneratorControllerCore extends AdminController
// @since 1.5.0
if ($this->product->depends_on_stock == 0)
{
$attributes = Product::getProductAttributesIds($this->product->id);
$attributes = Product::getProductAttributesIds($this->product->id, true);
foreach ($attributes as $attribute)
StockAvailable::removeProductFromStockAvailable($this->product->id, $attribute['id_product_attribute']);
StockAvailable::removeProductFromStockAvailable($this->product->id, $attribute['id_product_attribute'], Context::getContext()->shop);
}
$this->product->deleteProductAttributes();
$this->product->generateMultipleCombinations($values, $this->combinations);
// @since 1.5.0
if ($this->product->depends_on_stock == 0)
{
$attributes = Product::getProductAttributesIds($this->product->id);
$attributes = Product::getProductAttributesIds($this->product->id, true);
$quantity = (int)Tools::getValue('quantity');
foreach ($attributes as $attribute)
StockAvailable::setQuantity($this->product->id, $attribute['id_product_attribute'], $quantity);