From 1844628ec84288381c6afdb2c41dcd9f6a28d79c Mon Sep 17 00:00:00 2001 From: vChabot Date: Sat, 19 May 2012 10:16:24 +0000 Subject: [PATCH] [-] BO : BugFix : Creating a category in multishop updates her position as well --- classes/Category.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/classes/Category.php b/classes/Category.php index c5371778a..a2d94263c 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -156,13 +156,10 @@ class CategoryCore extends ObjectModel $this->level_depth = $this->calcLevelDepth(); $ret = parent::add($autodate, $null_values); if (Tools::isSubmit('checkBoxShopAsso_category')) - foreach (Tools::getValue('checkBoxShopAsso_category') as $row) + foreach (Tools::getValue('checkBoxShopAsso_category') as $id_shop => $value) { - foreach ($row as $id_shop => $value) - { - $position = Category::getLastPosition((int)$this->id_parent, $id_shop); - $this->addPosition($position, $id_shop); - } + $position = Category::getLastPosition((int)$this->id_parent, $id_shop); + $this->addPosition($position, $id_shop); } else foreach (Shop::getShops(true) as $shop)