I am trying to display add-to-cart button for out-of-stock products but didn't get how to do this.
I have already done below steps for displaying out-of-stock products:
1). Set System - Configuration - Catalog - Inventory - Stock Options - Display Out of Stock Products to Yes.
2). Set System - Configuration - Catalog - Inventory - Product Stock Options - Backorder to Allow Qty Below 0.
Is there someone who can guide me how can I achieve this in magento2.
Thanks in advance for your help.
Using your setting, out of stock product is not display.
You have given correct setting to display out of stock products.
Might be run command,
php bin/magento indexer:reindex
One thing you must check the product have also have correct setting. In edit product click on
make sure this is checked Use Config Settings in Backorders