All things Shopify and commerce
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 !
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
Hello, I'm using the Spotlight Theme, I couldn't find the product-template.liquid file. Is it named different for me?
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!
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
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.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hi @yenchoi010 ,
Please refer the below video which will enable enquiry CTA which will open the form to enter other details.
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025