[-] BO : #PSCFV-2473 - Fix bug with attribute value and shop

This commit is contained in:
mDeflotte
2012-05-21 15:32:56 +00:00
parent 361765b35a
commit a4368658f6
4 changed files with 9 additions and 2 deletions
@@ -691,8 +691,9 @@ class AdminAttributesGroupsControllerCore extends AdminController
$item = &$this->_list[$i];
$query = new DbQuery();
$query->select('COUNT(id_attribute) as count_values');
$query->select('COUNT(a.id_attribute) as count_values');
$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;