We are facing slow "add to cart" action with our store.
We have customized Shopify to integrate our custom book editor and use the "Ajax API" to allow our users to add products to their cards before redirecting them to the basket page.
We found out that it can take up to 15 seconds for an added product to appear in the cart.
To add a product to our customer basket, we use the AJAX API
What we do is the following:
- We call "add to cart" (https://shopify.dev/api/ajax/reference/cart#post-locale-cart-add-js)
- then we check every 5 seconds if the product is in the cart (https://shopify.dev/api/ajax/reference/cart#get-locale-cart-js)
- We redirect to the basket
We noticed that the product can take up to ~15 seconds to appear in the basket.
We think it's a performance issue on the Shopify API side, does anyone experience the same behavior?
We wonder if it's not related to the large number of products we have (1 customized book = 1 unique Shopify product)
Thank you in advance,
There might be an issue with the theme code or some other code-related issue because if you are using Ajax API we can add products to the cart within 3-4 secs.
Ask your developer to fix this issue.
Let us know if you need any further help.
All the best,
Dive into the world of Print-on-Demand and discover how it can transform your online busin...By Imogen Feb 19, 2024
Discover how to transform your online store into a delightful shopping destination. Learn ...By Ollie Feb 13, 2024