How to make the sold out button take me to an enquiry page?

cherrycreps
Visitor
3 0 0

Hello, So I need to change the 'Sold out' Button to 'Make an Enquiry' and send customers to another page I have made. 

I am using the Symmetry theme for reference. 

 

This is how far I have currently got.

cherrycreps_0-1714326131926.png

I have edited the 'Sold out' Text to say 'Make an enquiry'
However now I need this button to go to a different page..

 

How do I do this?

 

TIA x

 

Replies 4 (4)
cherrycreps
Visitor
3 0 0

Where can I edit the button code?

cherrycreps
Visitor
3 0 0

which file would that be in?

Im also not using the default theme, im using Symmetry

Sweet_Savior_3
Shopify Partner
1158 94 112

Hello @cherrycreps 

 

Welcome to Shopify Community.

 

As you have changed the text but now the code needs to work as you want it. So the JS needs to be changed for it. if you are not good with it altering the code by your ownself can break the theme Kindly please seek help of a developer to change the code at reasonable cost.

 

Let me know if you are looking for.

 

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!

gr_trading
Shopify Partner
1749 142 185

Hi @cherrycreps ,

 

You can achieve this using the help on custom dev, please refer the below video to implement enquiry form on the the page.

 

 

Now add the below code inquiry code was added to check for sold out case.

 

{%- liquid
            assign check_against_inventory = true
            if product.selected_or_first_available_variant.inventory_management != 'shopify' or product.selected_or_first_available_variant.inventory_policy == 'continue'
              assign check_against_inventory = false
            endif
            if product.selected_or_first_available_variant.quantity_rule.min > product.selected_or_first_available_variant.inventory_quantity and check_against_inventory
              assign quantity_rule_soldout = true
            endif
          -%}
/// Put all enquiry code here
{%- endif -%}

 

Code is for DAWN theme, please check the relevant code if not using DAWN.

 

Hope this will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee