From 305234f74f277b53b6cda1cd397072c4094a696c Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 12 Mar 2018 12:58:54 +0100 Subject: [PATCH] CS --- classes/Pack.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) 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)),