Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, guys
Just wondering how I can hide a shipping method when a specific coupon used in checkout.
As a web developer, any API is available for this kind of situation?
Your help will be appreciated.
What framework are you using?
Hi, Michael
Do you mean what framework I'm gonna use in my App?
Are you using the Storefront API?
There is no shipping method object in the Storefront API. Only the Admin API has it.
If you don't want to add a shipping method at checkout, you don't have to.
If you are on Plus, you can do this via Scripts: https://help.shopify.com/en/manual/checkout-settings/script-editor
You would create a Shipping Script, detect the coupon used, and disable the gateway.
All Shopify plans include discount codes. There is a limit of 20,000,000 unique discount codes for each store.
https://help.shopify.com/en/manual/discounts/create-discount-codes
Hello,
I can suggest an alternative solution. You can hide a shipping method using the “Discount amount” condition to approximate this using ShipRight app. Firstly identify the discount amount associated with the specific coupon.
This method hides the shipping method when the discount amount matches that of the specific coupon. However, it may affect other coupons with the same discount value.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024