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.

Check Gift Card Code against External List

Solved

Check Gift Card Code against External List

TravisImagine
Shopify Partner
16 0 2

Hello,

 

I have been looking into setting up gift cards with a third party system. I am hoping to make the existing system the master, as gift cards already exist there, and can be purchased in store and used there. I would also like those gift cards to be useable in Shopify as well.

 

One part of this process, is to check against the external system when a gift card is used in the checkout. After some investigation, it seems I can no longer use Shopify Scripts, as they will soon be deprecated, and I don't want to do this twice. I have been looking into checkout extensions, and I was wondering if it's possible to add an extension that let's me modify the "Apply Code" button? I don't see a specific spot to modify that button in the extension points. Or is there a specific Shopify Function I should be using to do this?

 

Travis

Accepted Solution (1)

lizk
Shopify Staff
246 58 77

This is an accepted solution.

Hi there! 👋
At this time there is not an extension point that let's you modify the content or the functionality of the current discount code field. 

A implementation that you could investigate is to create a new custom field for users to enter a gift cards, and update the language settings of the current one to denote it as discount codes only. 
With Checkout UI extensions you are able to make network requests. But you can only apply giftcards or discount code that are in Shopify's system.

The order discount function allows you to write your own logic on how an order discount should be applied to an order. But at this time you cannot make network requests with Shopify Functions. 

It may be possible that a combination of those two tools, could meet your needs. 

If you would like to leave a feature request for the Checkout UI team, you can create an issue on this github repository.

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

View solution in original post

Replies 2 (2)

lizk
Shopify Staff
246 58 77

This is an accepted solution.

Hi there! 👋
At this time there is not an extension point that let's you modify the content or the functionality of the current discount code field. 

A implementation that you could investigate is to create a new custom field for users to enter a gift cards, and update the language settings of the current one to denote it as discount codes only. 
With Checkout UI extensions you are able to make network requests. But you can only apply giftcards or discount code that are in Shopify's system.

The order discount function allows you to write your own logic on how an order discount should be applied to an order. But at this time you cannot make network requests with Shopify Functions. 

It may be possible that a combination of those two tools, could meet your needs. 

If you would like to leave a feature request for the Checkout UI team, you can create an issue on this github repository.

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

TravisImagine
Shopify Partner
16 0 2

Thank you Lizk, that may be the route I end up having to take. Thank you!