Merge pull request #435 from Yochima/yochima-branch
add argument id to the order_product loop
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user