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.
and replace with
[
Inquiry
](mailto:your-email@example.com?subject=Inquiry about {{ product.title }})
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
1 Like
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
https://help.shopify.com/en/manual/online-store/themes/os20/theme-structure/templates#create-a-new-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.
Hello, I’m using the Spotlight Theme, I couldn’t find the product-template.liquid file. Is it named different for me?
Hi @yenchoi010 ,
Please refer the below video which will enable enquiry CTA which will open the form to enter other details.