Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

how to know the subscript contract has free shipping discount

how to know the subscript contract has free shipping discount

Yasuhiro
Shopify Partner
3 0 0

Hi. I work on implement discount code on subscription. If a subscription contract has free shipping discount, i need to avoid adding other discount code.

Are there any free shipping info on subscriptionContract or subscriptionDraft?

Replies 2 (2)

NPeneycad
Shopify Staff
13 3 3

Hi @Yasuhiro,

 

Here are our official docs on creating and managing discounts on subscriptions - specifically for your questions, you may be looking for Adding a free shipping discount to a subscription contract and Querying discount allocations on a subscription contract.

 

Hope this helps!

 

Cheers,

Noah  

To learn more visit the Shopify Help Center or the Community Blog.

Yasuhiro
Shopify Partner
3 0 0

Hi Noah.

Thanks your the reply.

I have already implemented the feature to add free shipping code by subscriptionDraftDiscountCodeApply and subscriptionDraftCommit. and I can make sure the subscription contract has free shipping if the subscription purchase completed and  got mail. (the mail mention the purchase has free shipping)

but I can't make sure the subscription contract has free shipping before  the purchase is not completed even I use the Querying discount allocations.

it it is "percentage discount" or "fixed amount discount", it is listed in "data.subscriptionDraft.lines.edges[].node.discountAllocations[]". but if it is free shipping discount, it is not listed on the place.

I'm looking for the other way..

 

Yasuhiro