I’m trying to replicate something similar to how the Navidium app handles their Shipping Protection product.
Goal:
-
If a specific product (e.g., Shipping Protection) is in the cart, I want no discount code to apply to that product, even if the discount comes from:
-
A manually created code in the Shopify Admin
-
A code created by another 3rd-party app
-
-
Other products in the cart should still be eligible for discounts if possible.
What I’ve tried:
-
Using Discount Functions, but they only have access to discounts created by my own app and can’t block or modify other codes.
-
I understand Discount Functions can’t override native or 3rd-party codes.
Observation:
- The Navidium app seems to achieve this — the Shipping Protection product is added to the cart, and when it’s there, no discount codes apply (the discount field even gets disabled).
It looks like only that product is excluded, but it seems to block all discount codes while that product is present.
Question:
What’s the best practice to achieve this behavior?
-
Are they using a Checkout Validation Function that rejects checkout when both the protection product and a discount code are present?
-
Is there any reliable way to exclude a specific product from all discount codes (including those from Admin or third parties), without blocking discounts for other products?
If anyone has implemented something similar or has an official recommendation from Shopify’s dev team, I’d love to hear your insights!
Thanks in advance ![]()