Change add to cart button to "pre-order" on product out of stock 0 (dawn theme)

Hello,

how can I change the text of the add to cart button to “pre-order” when a product is out of stock and hide the dynamic checkout button?

I already tried apps but I want all the orders to be in the same place.

My my inventory is set to continue selling on zero stock items and I use dawn 10.0.0.

Store URL: https://prettypleaseatelier.com/

Thank you for your help.

Hi. You need to add a condition to your button in the code (below is an example) and you need to add the buttons you have in the code instead of the given buttons, while using this logic:

{% if product.available %}

{% else %}

{% endif %}

Hi @romartiny

Thank you for your reply, where should I add the code ?

I think the method of searching for an element by class will work for you. Download your theme and open it through a handy code editor. Then try to find the class “product-form__buttons”, there you should see these buttons.

1 Like

Hi @romartiny

Thank you for your reply, i tried to look for the button in base css, theme liquid, main product section, i just can’t find it …

Hey,
Hope that is still relevant.

You’ll need to edit your Dawn theme’s code. Go to Online StoreThemesActionsEdit code and find the product form file (typically sections/main-product.liquid or snippets/product-form.liquid). Add Liquid conditional logic checking if product.selected_or_first_available_variant.inventory_quantity is ≤ 0, then display “Pre-order” instead of “Add to cart.” Wrap dynamic checkout buttons with the same conditional to hide them at zero inventory. Here’s Shopify’s theme editing guide.

Trade-offs: This requires theme customization knowledge and maintenance across theme updates.

Alternatively, an app like K1 PreOrder (I’m the founder) automates this—replacing the button with “Pre-order” text when inventory hits zero and hiding dynamic checkout buttons automatically. It uses Theme App Extensions (no manual coding) and works with Dawn 10.0.0. Here’s the K1 PreOrder listing if relevant.

Happy to help with the theme customization if needed.

Best regards,
Yauheni