New Shopify Certification now available: Liquid Storefronts for Theme Developers

Checkout API - Discount code field

DiscountNinja
Shopify Partner
104 0 62

When creating a checkout via the Checkout API, how can we hide the discount code field?

 

Under some conditions, the checkout created via the Checkout API cannot accept additional discounts.

To ensure additional discounts cannot be added, the discount code field must be hidden in those cases (similar to how the checkout of a Draft Order invoice url behaves).

 

How can we hide this field conditionally when using the Checkout API?

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
Replies 4 (4)
DiscountNinja
Shopify Partner
104 0 62

Would appreciate if someone could comment on this.

Many thanks in advance.

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
Alex
Shopify Staff
Shopify Staff
1561 81 340

At this time there's no way to directly influence that field's appearance on checkouts unless you have access to edit the checkout liquid on a Plus store, but it definitely looks like this has been getting requested for some time. The checkouts/discounts teams are likely aware of this but I'll make sure that doesn't slip through the cracks.

 

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

DiscountNinja
Shopify Partner
104 0 62

Thanks for helping to bring this to the attention of the relevant teams Alex.

Appreciate it!

 

Resolving this will help the merchant, our mutual customer, to have much needed control over their margin and flexibility in their use of discount codes!

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
amosmos
Shopify Expert
80 1 32

Hey @DiscountNinja ,

 

May I ask how are you creating a checkout with the Checkout API and then have these checkouts completed through Shopify's storefront checkout interface?

 

Thanks,

Amos