Short description of issue
the limitation of the AJAX Cart API for local theme preview does not allow access to work with the Cart / Cart-drawer
Reproduction steps
Hello,
I have a recurring problem when developing themes with the Shopify CLI. Whenever I start the theme locally with the shopify theme dev command or similar preview tools, most features work as expected. However, regardless of the code, I always get an error with every theme when my theme JavaScript functions send a request to the endpoint /cart/change (e.g., to update the shopping cart). The error message is:
Failed to proxy request to /cart/change with status 502 (Bad Gateway)
My question:
Is there a way to fix this problem or a workaround so that I can also test cart functions locally? Or is this a general Shopify CLI limitation t
Additional info
The problem only occurs in local preview mode. Everything works as expected on the real store (live or staging environment). According to my research, this is a known limitation of the Shopify CLI: The proxy does not support all AJAX Cart API endpoints, especially /cart/change, which is why this function is generally not usable in the local preview.
What type of topic is this
Feature request