App reviews, troubleshooting, and recommendations
I have generated an App Block extension and a Shopify Function inside of the Node JS Shopify App template. I am using the /cart/change.js endpoint to update line item attributes for the cart items inside of the App Block JS file, and I am hoping to use them to apply an automaticAppDiscount for the customer inside of the Shopify function. I have verified the logic inside of the Shopify function works, however I have noticed that the page requires a refresh after a call to /cart/change.js as the PerformanceObserver can only run after the user has clicked add to cart, as such it is updating the line items after they have been added to the basket, so the attributes do not render immediately.
Can someone direct me to the correct way to implement this logic as per Shopify's documentation? I do not see anywhere in which this is explained, and just want to know how Shopify (or others) have gone about doing this!
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025