Correct assignation of $order_way parameter

This commit is contained in:
inem0o
2013-08-05 12:21:19 +02:00
parent 8c2af798a4
commit 2de866eff3
+1 -1
View File
@@ -67,7 +67,7 @@ class ProductSaleCore
if ($nb_products < 1) $nb_products = 10;
$final_order_by = $order_by;
if (is_null($order_by) || $order_by == 'position' || $order_by == 'price') $order_by = 'sales';
if (is_null($order_way) || $order_by == 'sales') $order_way == 'DESC';
if (is_null($order_way) || $order_by == 'sales') $order_way = 'DESC';
$groups = FrontController::getCurrentCustomerGroups();
$sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1');
$interval = Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20;