From c5069aaa156797a5b5087f57c4a43be62930d880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Mon, 17 Jun 2013 18:56:09 +0200 Subject: [PATCH 1/2] [-] WS: Fix accessories duplication on product update --- classes/Product.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/Product.php b/classes/Product.php index 1354df139..28189ded4 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -4565,6 +4565,7 @@ class ProductCore extends ObjectModel */ public function setWsAccessories($accessories) { + $this->deleteAccessories(); foreach ($accessories as $accessory) Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'accessory` (`id_product_1`, `id_product_2`) VALUES ('.(int)$this->id.', '.(int)$accessory['id'].')'); From 5f4b6a6534b1c8997db65843d13a88d97cde813e Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Tue, 18 Jun 2013 09:12:14 +0200 Subject: [PATCH 2/2] // After a successful install of a single module that has a configuration method, to the configuration page --- controllers/admin/AdminModulesController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index c457c4496..14664d394 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -673,6 +673,10 @@ class AdminModulesControllerCore extends AdminController // Get the return value of current method $echo = $module->{$method}(); + + // After a successful install of a single module that has a configuration method, to the configuration page + if ($key == 'install' && $echo === true && strpos(Tools::getValue('install'), '|') === false && method_exists($module, 'getContent')) + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&configure='.$module->name.'&conf=12'); } // If the method called is "configure" (getContent method), we show the html code of configure page