// The END

This commit is contained in:
rGaillard
2012-09-13 18:20:47 +00:00
parent 12afff4b12
commit 968b2cc88f
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);