Skip to content

Back in Stock Request Form for Shopify

Shopify product page section: a notify-me panel that appears only while the selected variant is sold out and sends the request through Shopify's contact form.

Also known as: shopify back in stock form, notify me when available shopify, shopify sold out notify me, restock request form, back in stock without app

Preview with sample data

Open in new tab

Liquid code

A back in stock request form for Shopify product pages. While the selected variant is sold out, a bordered panel invites shoppers to leave their name and email; when the variant is in stock, the panel is hidden. Requests go through Shopify's own contact form, so they arrive in your store's contact inbox without an app. Copy section.liquid into your theme's sections folder and add it to your product template from the theme editor as "WDS Back in stock request".

How it works

The section renders a Shopify contact form with name and email fields, plus hidden fields for the request type, product title, variant title and a link to the variant. It follows the variant selected in your theme's product form: when a shopper picks a sold-out size or color, the panel appears and names that variant; when they pick one in stock, it hides again. It also reads the variant parameter in the address.

After a submit, Shopify reloads the page and the panel shows your success message, with focus moved to it. Errors, such as an invalid email, appear above the fields.

The copy is honest about what happens next: there is no automatic alert. You receive the request by email and write to the customer yourself when the item is back.

Customization

All of these are in the theme editor:

  • Heading, Variant line, Text, Ask for a name, Name label, Email label, Button label and Note under the button.
  • Success heading, Success text, Error heading and Request name in your email, which helps you filter these messages.
  • Panel position (left, center or right) and Panel width.
  • Background, Panel, Text, Accent (button) and Button text colors.
  • Side padding, Top padding and Bottom padding.

Accessibility

The panel is a labelled region with an h2. Every field has a visible label, the email field is required and uses autocomplete="email", and errors are announced as an alert. The success message is a status message and receives focus after the page reloads. Inputs use a 16 px font size so phones do not zoom in, and all controls have a visible focus outline.

Usage notes

This section requires an Online Store 2.0 theme. Place it directly below your product information section; a theme section cannot sit inside the theme's own buy box, so the preview, which shows it under the buy button, is a simplification. Use Panel position to line it up with your product column. In the theme editor the panel is always shown so you can edit it.

The preview uses an invented product and only simulates the submit. Shopify may ask shoppers to complete a spam check before a contact form is sent. Variant changes are detected through the product form, change events and the address, which covers most themes; test it with a sold-out variant in yours. You need to keep track of the requests and email customers yourself.

Back in Stock Request Form for Shopify at a glance

Framework
Shopify
Code
Liquid
JavaScript
A small script inside the section, no jQuery
Dependencies
fonts.googleapis.com
Layout
Responsive, works on mobile
Category
Product Details
License
Free for personal and commercial use

Questions about this section

Can I use the Back in Stock Request Form for Shopify code for free?

Yes. You can copy or download the Liquid code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my Shopify store?

Create a new section named shopify-back-in-stock-request in your theme code editor, paste the Liquid code and save. Then add the section to a page in the theme editor. It works with Online Store 2.0 themes.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

How to install

  1. In your Shopify admin, go to Online Store > Themes, open the theme's menu and choose Edit code.
  2. Under Sections, add a new section named shopify-back-in-stock-request, replace its contents with the Liquid code above and save.
  3. Open the theme editor, choose Add section and add it to the page.

Requires an Online Store 2.0 theme. Try it on a copy of your theme first. WebDevSnippets is not affiliated with or endorsed by Shopify.

Back in Stock Request Form for Shopify – free Shopify product detail page template
Back in Stock Request Form for Shopify · free Shopify product detail page template

More Product Details

Bootstrap Product Page – free Bootstrap 5 product detail page template

Bootstrap Product Page

Bootstrap 5 product details page with image gallery, color and size pickers, quantity stepper, and tabs for description, specifications and customer reviews.

Product Detail with Gallery – free Tailwind CSS product detail page template

Product Detail with Gallery

Dark Tailwind CSS product page section with a thumbnail image gallery, finish options, quantity stepper and add to cart button with loading state.

Product Image Gallery with Color Variants – free Pure CSS product detail page template

Product Image Gallery with Color Variants

Product detail block whose photo gallery, price and stock label switch when a color swatch is selected, with front and close-up thumbnails.

Ingredients and Benefits Section for Shopify – free Shopify product detail page template

Ingredients and Benefits Section for Shopify

Shopify section for beauty and food stores: key ingredient cards with icon or image and benefit, a free-from tag row and the full INCI list in a toggle.

Product Information Tabs for Shopify – free Shopify product detail page template

Product Information Tabs for Shopify

Shopify section: product description, details, shipping and care in ARIA tabs with arrow-key support, turning into an accordion on mobile. Tabs can show a page.

Size Guide Popup for Shopify – free Shopify product detail page template

Size Guide Popup for Shopify

Shopify section: a Size guide link on product pages that opens an accessible dialog with a size chart from blocks, a cm / in toggle and how-to-measure notes.