// Deactivate customer groups in the install (automatically reactivated if you add a group or set a reduction)

This commit is contained in:
Damien Metzger
2013-11-21 14:57:55 +01:00
parent 26b90d5670
commit 9c5303df1d
10 changed files with 22 additions and 21 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ class ProductSaleCore
if (is_null($order_way) || $order_by == 'sales') $order_way = 'DESC';
$sql_groups = '';
if (Configuration::get('PS_GROUP_FEATURE_ACTIVE'))
if (Group::isFeatureActive())
{
$groups = FrontController::getCurrentCustomerGroups();
$sql_groups = 'WHERE cg.`id_group` '.(count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1');
@@ -152,7 +152,7 @@ class ProductSaleCore
if ($nb_products < 1) $nb_products = 10;
$sql_groups = '';
if (Configuration::get('PS_GROUP_FEATURE_ACTIVE'))
if (Group::isFeatureActive())
{
$groups = FrontController::getCurrentCustomerGroups();
$sql_groups = 'AND cg.`id_group` '.(count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1');