Skip to content

Commit

Permalink
Code refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed May 29, 2024
1 parent 32e2af4 commit 208c4fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Classes/CartManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,10 @@ public function validateLocation()
throw new ApplicationException(lang('igniter.local::default.alert_location_required'));
}

if ($this->location->orderTypeIsDelivery() && $this->location->requiresUserPosition() && !$this->location->userPosition()->isValid()) {
if ($this->location->orderTypeIsDelivery()
&& $this->location->requiresUserPosition()
&& (!$this->location->userPosition()->isValid() || !$this->location->checkDeliveryCoverage())
) {
throw new ApplicationException(lang('igniter.local::default.alert_no_search_query'));
}
}
Expand Down

0 comments on commit 208c4fc

Please sign in to comment.