// Fix total of attributes values in admin attribute page in multishop context

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15630 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-05-22 14:51:36 +00:00
parent 69fd70ec68
commit 4420cac66e
@@ -695,8 +695,9 @@ class AdminAttributesGroupsControllerCore extends AdminController
$query->from('attribute', 'a');
$query->join(Shop::addSqlAssociation('attribute', 'a'));
$query->where('a.id_attribute_group ='.(int)$item['id_attribute_group']);
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
$item['count_values'] = (int)$res;
$query->groupBy('attribute_shop.id_shop');
$query->orderBy('count_values DESC');
$item['count_values'] = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
unset($query);
}
}