Esempio n. 1
0
 /**
  * Update a quantity for a product or a combination.
  *
  * Does not work in Advanced stock management.
  *
  * @param \ProductCore $product
  * @param integer $quantity
  * @param integer $forAttributeId
  */
 public function processQuantityUpdate(\ProductCore $product, $quantity, $forAttributeId = 0)
 {
     // Hook triggered by legacy code below: actionUpdateQuantity('id_product', 'id_product_attribute', 'quantity')
     \StockAvailableCore::setQuantity((int) $product->id, $forAttributeId, $quantity);
     \HookCore::exec('actionProductUpdate', array('id_product' => (int) $product->id, 'product' => $product));
 }