Permalink
Browse files

Merge pull request #2519 from roadster31/order-by-ref-in-pse-loop

Added ordering by PSE reference in PSE loop
  • Loading branch information...
roadster31 committed Sep 19, 2018
2 parents 0b95229 + 1ef9971 commit 2e49badc8e6b16da15d9917ebc2aacf2529cb6ce
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 2e49bad

Please sign in to comment.