Unusual stock related messages when adding to cart

Highlighted
New Member
3 0 3

Hi there,

 

I have a product with 5 in stock. If I go to add 6 via ajax, the message the API gives back is:

 

You can't add more [product name] to the cart.

 

This seems a bit vague and impractical. Why doesn't it add all 5 and let you know the 6th couldnt? Or why doesn't it tell you how many are in stock? 

 

Thanks

2 Likes
Shopify Partner
267 26 42

Hi mindpattern,
It depends on which theme are you using, you can show how many products left are in the store by coding your theme. Which theme are you using?

Let's make the best store!
Contact us at: thepremierstores@gmail.com
0 Likes
Highlighted
Tourist
4 0 1

I had the same problem as you so I contacted support. The official response is that they removed this feature, even though it's currently what the documentation indicates the API should be doing.

 

If the product is entirely sold out, the error returned will say this:

The product #{item.name} is already sold out.

If the product is not sold out but the requested quantity exceeds what is available, yet at least 1 item can still be added to the cart, the error returned will specify how many more items can be added to the cart:

You can only add #{item.remaining_inventory} #{item.name} to the cart.

The #{item.remaining_inventory} value is equal to #{item.inventory_quantity} minus what's in the cart.

If the product is not sold out, but all of its stock is in the cart, the returned error will say:

All #{item.inventory_quantity} #{item.name} are in your cart.

 

This seems like a regression in functionality, so I'm not sure the motivation behind the change. In any case it's pretty disappointing that a change like this would be put into place without even updating the documentation.

1 Like
Highlighted
Shopify Partner
399 30 51

@tdot 

On which URL and page you are facing the issue. Please let me know with the store URL? If you want privacy then you can send the message in private or mail or skype.

Akshay Vaghasiya

Shopify Expert | Skype: akshayvaghasiya84
 - Like and Mark as an Accepted Solution if my reply helpful
 - Feel free to contact me on akshayvaghasiya84@gmail.com or akshayvaghasiya@lavitastic.com for any queries
 - Want to modify or custom changes on store hire me .
0 Likes
Highlighted
New Member
3 0 0

@Akshay_V 

I have the same problem with the debut theme. In what code can I change the message? I would love for it to tell how many of each product a customer can add in total. Is that a possibility? FYI the url is ltrshop.nl

Thanks in advance.

 

0 Likes
Highlighted
Shopify Partner
399 30 51

@SamLouter 

I am not seeing any inventory message on product page. Do you want to add like some many quantity available in single variant?

Akshay Vaghasiya

Shopify Expert | Skype: akshayvaghasiya84
 - Like and Mark as an Accepted Solution if my reply helpful
 - Feel free to contact me on akshayvaghasiya84@gmail.com or akshayvaghasiya@lavitastic.com for any queries
 - Want to modify or custom changes on store hire me .
0 Likes
Highlighted
New Member
3 0 0

Thanks for replying.

Something like that would be nice. 

Right now, when I try to add 10x a product and I have a stock of 9, I receive a message that I can't add this many. However, it does not show me how many I can actually add. I only want our inventory to show up when someone tries to add more than we have in stock if that's possible.

0 Likes
Highlighted
Shopify Partner
399 30 51

@SamLouter 

Well, I can display inventory but it is chargeable. So please let me know.

Akshay Vaghasiya

Shopify Expert | Skype: akshayvaghasiya84
 - Like and Mark as an Accepted Solution if my reply helpful
 - Feel free to contact me on akshayvaghasiya84@gmail.com or akshayvaghasiya@lavitastic.com for any queries
 - Want to modify or custom changes on store hire me .
0 Likes