This commit is contained in:
Michael RICOIS 2018-03-12 12:58:54 +01:00
parent 197f4161d1
commit 305234f74f

View File

@ -175,7 +175,6 @@ class PackCore extends Product
/**
* Add an item to the pack
*
* @param integer $id_product
* @param integer $id_item
* @param integer $qty
@ -187,6 +186,13 @@ class PackCore extends Product
return Db::getInstance()->AutoExecute(_DB_PREFIX_.'pack', array('id_product_pack' => (int)($id_product), 'id_product_item' => (int)($id_item), 'quantity' => (int)($qty)), 'INSERT');
}
/**
* Update item and his pack association
* @param integer $id_product
* @param integer $id_item
* @param integer $qty
* @return boolean true if everything was fine
*/
public static function updateItem($id_product, $id_item, $qty)
{
return Db::getInstance()->AutoExecute(_DB_PREFIX_.'pack', array('quantity' => (int)($qty)),