diff --git a/classes/AttributeGroup.php b/classes/AttributeGroup.php index b5515fa81..5544ffbaf 100644 --- a/classes/AttributeGroup.php +++ b/classes/AttributeGroup.php @@ -43,6 +43,7 @@ class AttributeGroupCore extends ObjectModel 'table' => 'attribute_group', 'primary' => 'id_attribute_group', 'multilang' => true, + 'multishop' => true, 'fields' => array( 'is_color_group' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'group_type' => array('type' => self::TYPE_STRING), diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 8076016fe..343039be4 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -2353,6 +2353,8 @@ class AdminControllerCore extends Controller $assos[] = array('id_object' => (int)$id_asso_object, 'id_'.$type => (int)$id_shop); } } + else // if we do not have the checkBox multishop, we can have an admin with only one shop and being in multishop + $assos[] = array('id_object' => (int)$id_object, 'id_'.$type => (int)Shop::getContextShopID()); return array($assos, $type); } @@ -2368,7 +2370,7 @@ class AdminControllerCore extends Controller return; $def = ObjectModel::getDefinition($this->className); - if (!empty($def['multishop'])) + if (empty($def['multishop'])) return; $assos_data = $this->getAssoShop($this->table, $id_object);