Some of our costumers have troubles with their cart. If they keep their cart open for a while with some products in it. And some of the products are sold out in the meanwhile, the costumer can’t go on with their cart. They get a notification that some products are out of stock, but it doesn’t show which products.
Is there a solution?
Can the cart maybe be updated real time and delete sold-out-products straight away?
Hi @JoeryUser ,
You can implement real-time cart updates to ensure customers are always aware of the current availability of the products in their cart. Here’s how you can handle it:
-
Real-Time Cart Updates: You can set up a script to refresh the cart whenever the customer revisits the page or after a set time interval, checking for any product availability changes. Shopify’s AJAX API allows you to make updates to the cart without refreshing the page, so you can check the stock status of each product in the cart and remove out-of-stock items in real time.
-
Notification with Specific Products: Instead of showing a generic notification that some products are out of stock, you can customize the message to show exactly which products are unavailable. This can be done by checking the cart items against your product inventory when the page loads.
-
App Solutions: There are Shopify apps available that can help you manage this functionality, such as “Auto Update Cart” or “Cartify,” which provide options to automatically update or notify customers about stock status changes.
-
Custom Solution: If you prefer a custom solution, a developer can implement a feature where the cart is checked periodically (e.g., every few minutes) for out-of-stock items and automatically removes them, with a clear message displayed to the customer.