How to add a post-purchase offer to the cart in my extension?

How to add a post-purchase offer to the cart in my extension?

bssjackson
Shopify Partner
2 0 0

Hello,

 

I am new to development and have been going through Shopify dev docs quite a bit.  I am working on building a post-purchase extension and have finally gotten it to show up after I process the order.  However, when I click the click me button to accept the post-purchase offer it does not add it to the cart.  I assume it needs some sort of action to add it to the cart but I have not been able to find anything on how to do this.  I assume I am missing the part from the code below but have no idea where to look for this.  Any help would be appreciated.  I am very new and learning as I go.  

 

async function fetchPostPurchaseData() {
// This is where you would make a request to your app server to fetch the data

 

I followed this tutorial and have it working based on the steps provided.  

https://shopify.dev/apps/checkout/post-purchase/getting-started-post-purchase-extension

Replies 0 (0)