This commit is contained in:
Marion Muszynski 2017-09-13 10:48:03 +02:00
parent 783d5c55e8
commit ff0a9dd73a

View File

@ -98,6 +98,7 @@ class ProductSale extends ProductSaleCore
private static function _getIdCategoryPrivateSales()
{
global $site_version_front;
$sale_exception = Configuration::get('ANT_BESTSALE_EXCEPTION');
$query = '
SELECT p.`id_category`
FROM `'._DB_PREFIX_.'privatesale` p
@ -105,7 +106,7 @@ class ProductSale extends ProductSaleCore
WHERE p.`date_start` <= NOW()
AND p.`date_end` >= NOW()
AND v.`version` = "'.pSql($site_version_front).'"
AND p.`id_sale` NOT IN ('.Configuration::get('ANT_BESTSALE_EXCEPTION').')
'.((!empty($sale_exception) && $sale_exception!='')?'AND p.`id_sale` NOT IN ('.$sale_exception.')':'').'
';
return $sales = Db::getInstance()->ExecuteS($query);
}