On continue à adapter le template...

This commit is contained in:
2021-04-16 19:23:51 +02:00
parent 1e2e612349
commit c160eb2141
127 changed files with 42260 additions and 36 deletions

View File

@@ -30,7 +30,8 @@ class DigressiveLoop extends BaseI18nLoop implements PropelSearchLoopInterface
{
return new ArgumentCollection(
Argument::createIntTypeArgument('product_id'),
Argument::createIntTypeArgument('quantity')
Argument::createIntTypeArgument('quantity'),
Argument::createBooleanTypeArgument('order')
);
}
@@ -50,6 +51,19 @@ class DigressiveLoop extends BaseI18nLoop implements PropelSearchLoopInterface
;
}
// TheCoreDev : rajout d'un tri sur la quantité
$order = $this->getOrder();
if (!is_null($order)) {
switch ($order) {
case true :
$search->orderByQuantityFrom();
break;
case false :
$search->orderByQuantityFrom(Criteria::DESC);
break;
}
}
return $search;
}