Skip to content

Commit

Permalink
Apply delivery fee coupon only on delivery orders
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Nov 22, 2023
1 parent 1ea6ae8 commit 92f366f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cartconditions/Coupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ public function beforeApply()
$couponModel = $this->getModel();
if (!$couponModel || $couponModel->apply_coupon_on == 'menu_items')
return false;

if ($couponModel->apply_coupon_on == 'delivery_fee' && !Location::orderTypeIsDelivery())
return false;
}

public function getActions()
Expand Down

0 comments on commit 92f366f

Please sign in to comment.