Pre-Order Text on Out-of-Stock Items

Topic summary

A user seeks to display conditional text above the Add to Cart button based on product stock levels:

Requirements:

  • When stock = 0: Show “Product out of stock, Pre-Order now” with a question mark icon that triggers a pop-up explaining pre-orders
  • When stock > 0: Display “Delivery 2-6 days” message
  • Using the Dawn theme

Solutions Offered:

  1. Custom Code Approach (BSS-TekLabs):

    • Edit main-product.liquid in theme code editor
    • Insert Liquid code checking current_variant.inventory_quantity
    • Add CSS styling for the message display
    • Requires locating the Add to Cart button code in Sections folder
  2. App-Based Solution (Sandy-STOQ):

    • Use a pre-order app from Shopify App Store
    • No coding required
    • Features include: customizable button text, disclaimers, product badges
    • Most apps offer free plans
    • Can apply settings across multiple products/variants

Current Status:
The original poster reports difficulty locating the Add to Cart button code in their theme files, suggesting implementation challenges with the custom code approach.

Summarized with AI on November 5. AI used: claude-sonnet-4-5-20250929.

Hello, I am trying to add a text above the Add to Cart button on my products which says something along the lines of “Product out of stock, Pre-Order now” or something similar (would be great if it is editable). Also along it should have a Question mark where i can add a small pop up message explaining what pre-order means.
This message should only pop-up, when the selected Size / Variant of a product’s stock is 0. When the product stock is above 0, I would also like to have a message above the Add to Cart Button saying “Delivery 2-6 days” (for example). Would that be possible through a easy code? I tried searching everywhere for answers but nothing worked for me..
I am using the Dawn theme.
here is an example of how it could look like:

And the Question mark pop up text example:

Thank you in advance!
Website URL: trinitysneakers.com

1 Like

@ChrisM187 Hi! Yes, this is possible with a bit of custom Liquid code and JavaScript. You can conditionally display messages based on stock levels for your variants. I can help you implement this in the Dawn theme, including the editable ‘Pre-Order’ message with the question mark pop-up.

1 Like
  • Here is the solution for you @ChrisM187
  • Please follow these steps:
  1. Go to Online Store → Theme → Edit code.
  2. Open the main-product.liquid file, which is located under the Sections folder
  • Locate the Add to Cart button: Look for the code that generates the Add to Cart button in the file. It will look something like this:

1 Like

-Add the dynamic message above the Add to Cart button: Insert this Liquid code above the button to dynamically display the “Pre-Order” or “Delivery” message based on the variant’s stock quantity.


  {% if current_variant.inventory_quantity <= 0 %}
    
    

      Product out of stock, Pre-Order now
      
      
        ?
      
    

  {% else %}
    
    
      Delivery 2-6 days
    

  {% endif %}

2 Likes

And add this code to top file

1 Like

@ChrisM187 :waving_hand:t3: You can also do this more easily with a preorder app from App Store. Most - including ours - have a generous free plan and with them, you can -

  1. Make it very clear that customers are preordering the product by changing the ‘Add to cart’ button.
  2. Add a disclaimer underneath so customers know what to expect with their preorder.
  3. Add a badge on the products to distinguish them from regular in-stock items.

And you can do all of this across products and variants of products. Here’s what ours looks like, and most apps will let you add some version of this to the product page with no coding. :slightly_smiling_face: -

For a weird reason i can not find the add to cart button..

Hey,

You can achieve this with a Liquid customization in your Dawn theme. In Online StoreThemesEdit code, find your product template (usually main-product.liquid or product-form.liquid). Add conditional logic checking variant.inventory_quantity: when ≤ 0, show “Product out of stock, Pre-Order now” with a tooltip (HTML/CSS for the question mark icon); when > 0, show “Delivery 2-6 days.” Position this above the Add to Cart button. Shopify’s theme customization guide has more details.

Trade-offs: requires basic Liquid knowledge and manual updates if you change messaging later.

Alternatively, an app like K1 PreOrder (I’m the founder) automates this with inventory-based rules that trigger pre-order messaging when stock runs low, custom messages with tooltips, and no coding needed. Here’s the K1 PreOrder listing if relevant.

Happy to help with the theme customization if needed.

Best regards,
Yauheni