How to add a sold out waiting list to your product page
This code will replace the "Add to Cart" button with a "Tell me when available" button when a product is out of stock.
You can setup the "Tell me when available" button to open a lightbox with a form or open a page with a form to collect emails addresses. In any case, create a page with a form and set the page URL to sold-out-waitlist.
If you choose to use a lightbox, we have a great Lightbox Plugin for this.