Skip to content

Commit

Permalink
fix: eary return calculate shipping with no options when weight > 30kg
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Sep 13, 2024
1 parent b15bbda commit 64ee1dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions functions/routes/ecom/modules/calculate-shipping.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ exports.post = ({ appSdk }, req, res) => {
}
finalWeight += (quantity * (physicalWeight > cubicWeight ? physicalWeight : cubicWeight))
})
if (finalWeight > 30) {
res.send(response)
return
}

// pre check for maximum allowed declared value
if (secureValue < 20.5) {
Expand Down

0 comments on commit 64ee1dc

Please sign in to comment.