diff --git a/classes/Pack.php b/classes/Pack.php index 43d9931f..9d6c6c6d 100755 --- a/classes/Pack.php +++ b/classes/Pack.php @@ -174,19 +174,25 @@ class PackCore extends Product } /** - * Add an item to the pack - * - * @param integer $id_product - * @param integer $id_item - * @param integer $qty - * @return boolean true if everything was fine - */ + * Add an item to the pack + * @param integer $id_product + * @param integer $id_item + * @param integer $qty + * @return boolean true if everything was fine + */ public static function addItem($id_product, $id_item, $qty) { Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'product SET cache_is_pack = 1 WHERE id_product = '.(int)($id_product).' LIMIT 1'); 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)),