Permalink
Browse files

Added ordering by reference in PSE loop

  • Loading branch information...
roadster31 committed Sep 19, 2018
1 parent 0b95229 commit 1ef997189ac0a75e79aa9dcefd4ebf28c9ce51a1
Showing with 7 additions and 0 deletions.
  1. +7 −0 core/lib/Thelia/Core/Template/Loop/ProductSaleElements.php
@@ -78,6 +78,7 @@ protected function getArgDefinitions()
new Type\EnumListType(
array(
'id', 'id_reverse',
'ref', 'ref_reverse',
'quantity', 'quantity_reverse',
'min_price', 'max_price',
'promo', 'new',
@@ -144,6 +145,12 @@ public function buildModelCriteria()
case "id_reverse":
$search->orderById(Criteria::DESC);
break;
case "ref":
$search->orderByRef(Criteria::ASC);
break;
case "ref_reverse":
$search->orderByRef(Criteria::DESC);
break;
case "quantity":
$search->orderByQuantity(Criteria::ASC);
break;

0 comments on commit 1ef9971

Please sign in to comment.