start shipping zone management
This commit is contained in:
@@ -42,4 +42,6 @@ class ShippingZoneController extends BaseAdminController
|
||||
"shipping_zones_id" => $shipping_zones_id
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -75,7 +75,9 @@ class Area extends BaseLoop
|
||||
protected function getArgDefinitions()
|
||||
{
|
||||
return new ArgumentCollection(
|
||||
Argument::createIntListTypeArgument('id')
|
||||
Argument::createIntListTypeArgument('id'),
|
||||
Argument::createIntTypeArgument('with_zone'),
|
||||
Argument::createIntTypeArgument('without_zone')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -101,6 +103,24 @@ class Area extends BaseLoop
|
||||
$search->filterById($id, Criteria::IN);
|
||||
}
|
||||
|
||||
$withZone = $this->getWith_zone();
|
||||
|
||||
if ($withZone) {
|
||||
$search->joinAreaDeliveryModule('with_zone')
|
||||
->where('`with_zone`.delivery_module_id '.Criteria::EQUAL.' ?', $withZone, \PDO::PARAM_INT);
|
||||
}
|
||||
|
||||
$withoutZone = $this->getWithout_zone();
|
||||
|
||||
if($withoutZone)
|
||||
{
|
||||
$search->joinAreaDeliveryModule('without_zone', Criteria::LEFT_JOIN)
|
||||
->addJoinCondition('without_zone', 'delivery_module_id '.Criteria::EQUAL.' ?', $withoutZone, null, \PDO::PARAM_INT)
|
||||
->where('`without_zone`.delivery_module_id '.Criteria::ISNULL);
|
||||
}
|
||||
|
||||
//echo $search->toString(); exit;
|
||||
|
||||
$areas = $this->search($search, $pagination);
|
||||
|
||||
$loopResult = new LoopResult($areas);
|
||||
|
||||
Reference in New Issue
Block a user