Switching "Add to cart" button to "Inquiry" button

yenchoi010
Tourist
11 0 3

Hello everyone,

 Can Someone please write me a code, so I can change 'Add to Cart' button into 'Inquiry' button? And If it is possible, is there a way when the customers click the 'Inquiry' button, it directs to send e-mail to me directly?

 

P.s I am new to Shopify and coding stuff so please provide step by step guide.

 

Thank you very much ! 

화면 캡처 2023-08-07 111645.png

Replies 5 (5)

azamgill
Shopify Partner
323 47 75

Hey @yenchoi010 

 

From your Shopify admin, go to Online Store - Themes. Find the theme you want to edit, and then click Actions - Edit code. Open the product-template.liquid file or the file where the Add to Cart button is defined. It depends on a theme to theme.
Find some code like this.  

 

 

 

<button type="submit" name="add" id="AddToCart" class="btn">
  {{ 'products.product.add_to_cart' | t }}
</button>

 

 

and replace with 

 

 

<a href="mailto:your-email@example.com?subject=Inquiry about {{ product.title }}" class="btn-email">
  Inquiry
</a>

 

 

You may need to adjust the CSS to make the new button match the style of your theme. This can be done in the theme's CSS file, often named theme.scss.liquid.

 

 

a.btn-email {
  display: inline-block;
  padding: 10px 20px;
  background-color: #333;
  color: #fff;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
}

a.btn-email:hover {
  background-color: #444;
}

 

 

 

Best of Luck

Azam

 

 

Azam Gill
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- Encourage me ❤️

Come and visit us at Wbify
nabilh17
Tourist
8 0 0

Hello, I'm using the Spotlight Theme, I couldn't find the product-template.liquid file. Is it named different for me?

biznazz101
Shopify Partner
494 50 89

Go to Theme> Click "..."> Edit Default Theme Content

Then search "Add to cart"

It will pop up, change the text, click save. That is it! Good luck!

Don't hesitate to reach out for more help with your store.
SEE OUR TASK STORE or check us out via our profile! FREE STORE AUDIT

PaulNewton
Shopify Partner
6339 579 1343

Hello @yenchoi010 

Avoid adding unrelated or unfamiliar labels to things,  "Shop performance" is about website speed not arbitrary business "performance" of features.

 

If the theme is an OS2.0 theme and supports custom-liquid blocks in the product-form in the theme designer:

If this is for specific products create an alternate template

https://help.shopify.com/en/manual/online-store/themes/os20/theme-structure/templates#create-a-new-t...

In either case disable the buy-buttons block in the theme editor then in a a custom-liquid block add a custom contact form:

https://shopify.dev/docs/themes/customer-engagement/add-contact-form 

Otherwise us a custom-liquid section, that will sit under the product-info area.

 

If you need this customization created can contact me by mail for services.
Please always provide context, examples: store url, theme name, post url(s) , or any further detail.
Contact Info in signature.

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


gr_trading
Shopify Partner
1751 142 187

Hi @yenchoi010 ,

 

Please refer the below video which will enable enquiry CTA which will open the form to enter other details.

 

 

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