diff --git a/classes/Attribute.php b/classes/Attribute.php index 71e324c15..b6ac51e39 100644 --- a/classes/Attribute.php +++ b/classes/Attribute.php @@ -47,7 +47,6 @@ class AttributeCore extends ObjectModel 'color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor'), 'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), - // Lang fields 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), ) ); @@ -130,7 +129,7 @@ class AttributeCore extends ObjectModel return array(); return Db::getInstance()->executeS(' - SELECT ag.*, agl.*, a.`id_attribute`, al.`name`, agl.`name` AS `attribute_group` + SELECT DISTINCT ag.*, agl.*, a.`id_attribute`, al.`name`, agl.`name` AS `attribute_group` FROM `'._DB_PREFIX_.'attribute_group` ag LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.')