Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Good afternoon everyone!
I'm creating my store in the empire theme due to a huge inventory. Some items cannot be sold online, so I'm trying to create a product page template where the "buy now/add to carts" buttons are removed/replaced with a contact us button. Does anyone have any advice or help on this??
Thanks in advance for any tips. Also, I already know about creating a new template but it I'd like it to literally be the same...
Hey @JimmyFlashSew
Great question! Yes, this should be doable. Each theme is unique and comes with their own custom elements, so how you accomplish this could change. Essentially all you need is a "button" (image) that links to your contact form.
The first step will be to create a new product page template that you can assign to these "contact us" products. In the theme editor select the drop down at the top of the page and go to Products > Create new template (or edit an existing one you may not be using).
Having a look at the Empire theme from our theme store it does appear that they offer a built in product page block called "Request a Quote" which you can use. This embeds a contact form into the product page for the item. You can also use some custom liquid to create your own button. You will find the option to add a custom liquid block in most areas of the theme editor. I used a free AI tool, like ChatGPT, to generate this button, feel free to use it as well. You can also use a tool like ChatGPT to help change the formatting, position, etc.:
<!-- Contact Us Button --> <div class="contact-us-button"> <a href="DESTINATION URL" class="btn btn--primary">Contact Us</a> </div>
<!-- Optional: Add some styling --> <style> .contact-us-button { margin-top: 20px; } .contact-us-button .btn { background-color: #007bff; /* Customize the button color */ color: #fff; padding: 10px 20px; text-decoration: none; border-radius: 5px; } .contact-us-button .btn:hover { background-color: #0056b3; /* Customize the hover color */ } </style>
If you need help integrating this custom option on your store or are not finding an existing product block that suits your purpose, you may want to look at hiring some outside help. For anyone familiar with theme code on Shopify, this will be a fairly simple task. You can hire someone from our partner directory for assistance.
Hope this helps!
Shay | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi,
While this is typically considered a custom task, I can assist you this time. Could you please specify the exact page where you want to hide the 'buy now/add to carts' buttons? Additionally, please provide the destination page you want users to be directed to when they click the 'contact us' button.
Terence.
Thank you Terrance for your assistance. I truly appreciate it.
So my request is for specific products. What I was trying to do was build a product page template to apply to those specific ones. That way I can change as need be.
You are welcome, Jimmy.
So, from what I understand, you have a specific collection page ( or page ) and you don't want some products within it to be sold to customers. If that's the case, if you can assign a 'tag,' 'product label,' or something else that distinguishes these products and makes them visible on the products, we can prevent these items from being purchased by customers both on the collection page ( or page ) and on the product page. I hope I've explained this clearly!
Morning Terence! ☕
I'm not understanding that. You're saying if I create a specific tag for the products I don't want to sell, they won't be able to purchase them?
What I'm trying to do is this: we are a dealer to sell machines. Certain machines are not available to be sold online, but rather they would need to come in and buy or have a discussion over the phone with us. Instead of a buy/quick shop/add to cart button, I'd like to have the button be a contact us or request pricing.
Morning Jimmy,👋
Are all the products you don't want to sell online on a specific page, or are there just some products on one page that you don't want to sell? If these products are all on a single page, it will be easier to handle.
Terence.
So the products have their own individual product page...however, they will be in a collection together with some that are sold online.
I'm trying to create a product page template with no buy button but instead divert it to a contact us page.
As I understand it, the products you don't want to sell online will be on both the normal collection page and a separate page. We can hide the 'buy button' for all the products in the specially created collection page and redirect it to another page. That's the easy part.
The harder part is if the products you don't want to sell online are on the same page as the normal products. In that case, we need to differentiate them somehow. This differentiation could be done by identifying something unique about the product, like a 'tag' or 'product label.' In short, a small difference is all we need.
I recommend taking a look at the information below.
https://www.youtube.com/watch?v=pSSDlQS3vGE
Ok Terence, that really wasn't what I was looking for. Maybe you can help me with writing a liquid code to add the button
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024