// 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:
@@ -695,8 +695,9 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
$query->from('attribute', 'a');
|
$query->from('attribute', 'a');
|
||||||
$query->join(Shop::addSqlAssociation('attribute', 'a'));
|
$query->join(Shop::addSqlAssociation('attribute', 'a'));
|
||||||
$query->where('a.id_attribute_group ='.(int)$item['id_attribute_group']);
|
$query->where('a.id_attribute_group ='.(int)$item['id_attribute_group']);
|
||||||
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
$query->groupBy('attribute_shop.id_shop');
|
||||||
$item['count_values'] = (int)$res;
|
$query->orderBy('count_values DESC');
|
||||||
|
$item['count_values'] = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
||||||
unset($query);
|
unset($query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user