All things Shopify and commerce
Hello all. I am attempting to grey out and disable the add to cart button when you select a sold out variant. I have tried so many different liquid variables and other various ways of achieving this but none of them seem to work.
I have linked here one of my products (https://deauxofficial.myshopify.com/products/script-logo-tee). The variable 'M' is out of stock, but the button does not grey out when 'M' is selected. I appreciate anyone who could help.
Thanks!
Under Products, navigate to your product and you will see the variant options. Select the variant and choose edit. Scroll down to where is says inventory and Select Track quantity and the next option that says Continue selling when out of stock needs to be deselected or not selected. I hope that helps.
Hi @CH23, I appreciate you coming back to me. This is looking like a custom code issue rather than a settings issue. I appreciate your efforts though!
Hi, @adammahon
Greetings, and thanks for posting.
Stopping the sale of sold-out products should not require adjusting the theme liquid. When creating your products, if you want to prevent customers from purchasing products that are sold out, you will need to track the products inventory, and make sure to select 'Continue selling when out of stock.'
If you have this selected for each of your products, and customers are still being able to add the products to the cart, it could be your coding that has caused the issue. I recommend setting testing on a fresh theme. This means a theme that is freshly downloaded to your theme library and has not had any customizations done to it.
In the meantime, it looks like your store is password protected. If you can provide the password I would love to take a look and see what additional feedback I can provide.
Hi Skye. I appreciate your response.
Yes customers can still add this product to the cart when I have those options selected as mentioned. Also, when I select these options the text no longer switches to 'Sold out' on the sold out variants.
I will add my store password so you can take a closer look: rahdro
Hi, @adammahon
Thanks for providing the password, the site is beautiful so far! I especially like the footer.
That being said, if you have the correct settings enabled in your Shopify Admin, and the products are not being listed as 'sold out,' then the issue is with your theme. Which theme are you using?
To fix this, you would need to correct the coding adjustments you have made. If you're unsure of how to do that, the best course of action is to download a fresh version of the theme and compare the codes between your customized version, and the fresh version. Another option would be to roll back your theme to before you made the customizations.
In the meantime, as I can see the store is still under development, the only advice I can provide at this point is to adjust the announcement bar from overlapping the logo. Other than that, it looks great!
Hi Skye, I appreciate your help.
I am using a custom theme here as I am a web designer by trade. I am confident this is a custom coding issue but the usual code fixes don't seem to be working.
I also appreciate your kind feedback on the look and feel of the website!
Hello @adammahon
Were you able to fix this issue? Im new and currently having the same issue. Thanks!
Hi, is there a way to set it to automatically have it set to off for "continue selling when sold out" when adding new products? Also any way to bulk turn it off because all 1000+ of my products have it turned on and it will be very time consuming to do it one by one 😞 https://redrosehype.com/
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025