Shopify themes, liquid, logos, and UX
How to disable the Buy It Now button for products that are out of stock?
Hello,
Please share "Store URL"
Thanks!
We do this automatically in our pre-order app (Early Bird) using Javascript (when we show a back-order or "Notify me" button), but I think it'd be simpler to do this in Liquid if you have some theme coding knowledge.
You can find the conditions used to show the Sold out button, and copy that logic to wrap around the Buy it Now button, so it only renders it if the product is in stock.
Hello @TE-A-ME
Please share your store URL and password.
So that I will check and let you know the exact solution here.
Hi @TE-A-ME,
Please send me the code of main-product.liquid file, I will help you check it
@TE-A-ME Your best bet is modifying theme code - you can do it through Javascript or you can hide the button altogether with CSS.
IMO, if you're considering removing the Buy it Now button, you should definitely consider using a preorder flow on the product. Most preorder apps - including STOQ, which we run full time - will automatically hide the Buy it now button on out of stock products that are configured for preorder. So not only do you have the issue of hiding it resolved, you can also get preorders on them and have a chance to get orders in ahead of any restocks. 🙂
Founder & CEO, Artos Software
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024