change min_quantity & max_quantity

change :

min_quantity by quantity
max_quantity by quantity_reverse
This commit is contained in:
zzuutt
2014-07-15 13:09:13 +02:00
parent a6a6269742
commit 2e9b42053b

View File

@@ -60,7 +60,7 @@ class ProductSaleElements extends BaseLoop implements PropelSearchLoopInterface
new Argument( new Argument(
'order', 'order',
new TypeCollection( new TypeCollection(
new Type\EnumListType(array('min_quantity','max_quantity','min_price', 'max_price', 'promo', 'new', 'random')) new Type\EnumListType(array('quantity','quantity_reverse','min_price', 'max_price', 'promo', 'new', 'random'))
), ),
'random' 'random'
) )
@@ -79,10 +79,10 @@ class ProductSaleElements extends BaseLoop implements PropelSearchLoopInterface
foreach ($orders as $order) { foreach ($orders as $order) {
switch ($order) { switch ($order) {
case "min_quantity": case "quantity":
$search->orderByQuantity(Criteria::ASC); $search->orderByQuantity(Criteria::ASC);
break; break;
case "max_quantity": case "quantity_reverse":
$search->orderByQuantity(Criteria::DESC); $search->orderByQuantity(Criteria::DESC);
break; break;
case "min_price": case "min_price":