Disable Buy It Now button for Out Of Stock Products

Disable Buy It Now button for Out Of Stock Products

TE-A-ME
Tourist
8 0 2

How to disable the Buy It Now button for products that are out of stock? 

Replies 6 (6)

topnewyork
Astronaut
1521 187 249

Hello,

 

Please share "Store URL"

 

Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
TE-A-ME
Tourist
8 0 2

JayAdra
Shopify Partner
195 15 53

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.

ZestardTech
Shopify Partner
6148 1100 1476

Hello @TE-A-ME 

Please share your store URL and password.
So that I will check and let you know the exact solution here.

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing

namphan
Shopify Partner
2695 349 397

Hi @TE-A-ME,

Please send me the code of main-product.liquid file, I will help you check it

Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com

Sandy--STOQ
Shopify Partner
110 5 14

@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. 🙂

STOQ: Preorders & Back in stock alerts made easy for Shopify
Filemonk: Sell digital products & downloads in 3 quick steps

Founder & CEO, Artos Software