From 2587f208c6661f07fe95fd603a59c5b918a56561 Mon Sep 17 00:00:00 2001 From: Guillaume Barral Date: Tue, 27 May 2014 08:44:49 +0200 Subject: [PATCH] add argument id to the order_product loop --- core/lib/Thelia/Core/Template/Loop/OrderProduct.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/lib/Thelia/Core/Template/Loop/OrderProduct.php b/core/lib/Thelia/Core/Template/Loop/OrderProduct.php index 83397a9cb..c66d6e1ea 100644 --- a/core/lib/Thelia/Core/Template/Loop/OrderProduct.php +++ b/core/lib/Thelia/Core/Template/Loop/OrderProduct.php @@ -41,7 +41,8 @@ class OrderProduct extends BaseLoop implements PropelSearchLoopInterface protected function getArgDefinitions() { return new ArgumentCollection( - Argument::createIntTypeArgument('order', null, true) + Argument::createIntTypeArgument('order', null, true), + Argument::createIntListTypeArgument('id') ); } @@ -58,6 +59,10 @@ class OrderProduct extends BaseLoop implements PropelSearchLoopInterface $search->filterByOrderId($order, Criteria::EQUAL); + if (null !== $this->getId()) { + $search->filterById($this->getId(), Criteria::IN); + } + $search->orderById(Criteria::ASC); return $search;