Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkout fetch / API does not update line item title or subtotal in checkout session if items are changed once already in a cart #900

Open
leemethvenmtc opened this issue Jun 7, 2022 · 0 comments

Comments

@leemethvenmtc
Copy link

Hi,

OS: WIndows
Browser: Chrome (but happens on them all)
SDK Version: Latest as of this post

We're having an issue where when we've added a line item / product to a "cart" / checkout session, if that item's title or price is updated in Shopify, a reload of the page does not fetch the new item title and the cart / checkout subtotal goes out of sync - although the line item price updates properly.

On each load we are fetching checkout using the client.checkout.fetch() method, unfortunately it appears like the data (cart subtotal, item titles) are being cached Shopify side, which is causing the above issue, which is out of date product names and overall subtotal / cart price.

The only way to get the checkout session or cart to update is to visit the checkout and when it fixes itself there, it then pulls through the checkout session via the fetch method correctly.

Here's a video recording showing the issue: https://leemtc.tinytake.com/msc/NjkwNTg1Nl8xOTU4ODQ1MA

We had the same issue with the BuyButton.js library before and were hoping it would not be a problem with the SDK approach, but unfortunately it's resurfaced.

Is there anything we can do via the Buy SDK to force this functionality / a total refresh of checkout session?

Thanks,
Lee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant