If back-orders are turned off and a customer adds the last item in stock for that product in the cart, the product still appears to be “in stock”. If the page is refreshed and the product is added to cart again (Figure 1), it automatically opens to the product details page with this message at the top (Figure 2), and all the divs are in disorder.
Figure 1 – https://dl.dropbox.com/u/44458621/grfc-1.jpg
Figure 2 – https://dl.dropbox.com/u/44458621/grfc-2.jpg
Do you have an example we can take a look at live?
I’ll tag the topic for Kriesi but it sounds like there might need to be a bit of a template fix for the issue in your Figure 2. The main issue however is, I believe, a limitation of how the plugin registers out of stock vs ajax updating of the cart. So when the item is added to the cart it takes an actual page refresh for the rest of the pages content to update to what is in the database for that product.
After the item is in the cart, it happens on all the catalog pages.
Is there a way to check if the item is already in the cart before adding it again?
No, unfortunately this is not easily possible. Like Devin pointed out above the plugin doesn’t “reserve” items which are already in the cart. Thus everyone can add it to the cart as long as it’s not part of an order. If someone buys the last item (and the checkout process is finished) the stock managment will reduce the stock items to 0 and wc will mark the item as “sold out”.
The topic ‘Add to Cart Issue’ is closed to new replies.