How to change the action of the add to cart button when a variant is sold out

Hi, I wondered if anyone has seen an app or knows how to do the folllowing:

when a variant sells out we don’t want the button to say out of stock or sold out but we also don’t want to set up a pre-order - instead when the variant sells out we want customers to be able to click the add to cart button and it act as a contact us link - so we can discuss lead times, pre orders and the like with the customer

can anyone help?

thanks

Hi @charlie1408

May this article can help you

https://help.shopify.com/en/manual/products/purchase-options/pre-orders/setup

Hello @charlie1408 ,

Follow the steps but before making the changes take the backup of the theme:

  1. Create an alternate template for the product.
  2. Assign it to those products where you need the contact us button instead of the sold out button.
  3. Replace the sold out button code in the product template with the contact us link.
    Note: Code knowledge is must to achieve it.

Thanks

hi @charlie1408

We can custom code in your theme where when the variant is out of stock CTA text is changed to contact us for lead time and he will be redirected to contact us form with prefilled variant ID.