Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
let's say a customer wants to buy 10 pillows (but we have only 9 in stock)
he adds them to the cart but when he clicks on the "add to cart" button he gets an alert saying "You can't add more pillows to the cart"
what we'd like would be add to that message the current available quantity, something like
"Unfortunately we only have xxxcurrentquantityinstockxxx left in stock, send us a message if you want to order more"
I've tried to add
{{ current_variant.inventory_quantity }}
to the translation but it doesn't works, what am I doing wrong?
Thanks for you help
Ok, I understood your goal. Please send me your store url so I can check and assist you better.
Thank you,
Tejas
Can you provide product URL to better look at this issue?
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Open file halo.js inside your assets folder of your theme and go to line 2915 change the code to
// Old $('.ajax-error-message').text($.parseJSON(xhr.responseText).description); // New $('.ajax-error-message').text('your_message_that_you_want_to_edit');
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Did you ever get a resolution? I'm looking to do the same thing.
Hi, did you find out how to do it? I'm looking for the same. Thanks!
Hi!
I would also find this very useful for shopify website as well. Using debut theme. Is there any language i can add to "checkout & system notices" in cart section of theme language or do i need to tweak the code files?
Any help would be greatly appreciated.
Ian
Hi, i'm looking to do the same thing, did you ever find a solution to this?
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025