Cleaned the mess of Shipping zones, which is Shipping configuration...

This commit is contained in:
Franck Allimant
2014-04-15 20:11:33 +02:00
parent 449bbdd67d
commit 123280f4d4
8 changed files with 96 additions and 35 deletions

View File

@@ -77,7 +77,8 @@ class Area extends BaseLoop implements PropelSearchLoopInterface
return new ArgumentCollection(
Argument::createIntListTypeArgument('id'),
Argument::createIntTypeArgument('with_zone'),
Argument::createIntTypeArgument('without_zone')
Argument::createIntTypeArgument('without_zone'),
Argument::createBooleanOrBothTypeArgument('unassigned')
);
}
@@ -106,6 +107,14 @@ class Area extends BaseLoop implements PropelSearchLoopInterface
->where('`without_zone`.delivery_module_id '.Criteria::ISNULL);
}
$notAssigned = $this->getUnassigned();
if ($notAssigned) {
$search
->joinAreaDeliveryModule('unassigned', Criteria::LEFT_JOIN)
->where('`unassigned`.delivery_module_id ' . Criteria::ISNULL);
}
return $search;
}