Hello, I have a Shopify plus store and I am adding line item properties in the checkout using the Cart Ajax API. This adds the properties to the correct line item. However, sometimes, when refreshing or navigating to the next page they disappear. This does seem random, as sometimes it works fine and then does not without any code changes.
The steps to reproduce are the following:
- Make a POST request to https://${window.Shopify.routes.root}/cart/change.js on the checkout information page with the following payload:
{"line":1,"properties":{"deliveryMethod":"HD"}}
-
Check the response, it will come back looking all good. You can call GET request to https://${window.Shopify.routes.root}/cart.js and again all is looking good.
-
Refresh, navigate to the next page and make a GET request to https://${window.Shopify.routes.root}/cart.js and look for the properties in the line items.
This will sometimes work fine, I can see orders with the correct line item properties in the Shopify admin, however, it will randomly fail sometimes. The x-request-id for a request that has failed is 537575c0-7818-4c2f-b68f-bcc054909b38 if this can provide any info on why it has failed.