1 jour
La requête correcte est
La table ps_attribute_lang doit avoir une colonne id_attribute
Les attributs ce sont les déclinaisons.
CODE
$results = Db::getInstance()->executeS('
SELECT CONCAT(agl.`name`, " - ", al.`name`) as name, a.`id_attribute` as id
FROM `'._DB_PREFIX_.'attribute_group_lang` agl
LEFT JOIN `'._DB_PREFIX_.'attribute` a
ON(a.`id_attribute_group` = agl.`id_attribute_group`)
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
ON(a.`id_attribute` = al.`id_attribute`
AND al.`id_lang` = '.(int)Context::getContext()->language->id.')
WHERE agl.`id_lang` = '.(int)Context::getContext()->language->id.'
ORDER BY agl.`name`, al.`name`
');
La table ps_attribute_lang doit avoir une colonne id_attribute
Les attributs ce sont les déclinaisons.
11 h.
11 h.