Jump to content

Adding an 'Enquire' button to all product pages on website to link through to contact page

Recommended Posts

Posted

Hi there, 

I am yet to build my website so can not provide a link yet but any help would be much appreciated.

I want to remove my 'Add To Cart' button on ALL product pages of my website and replace with an 'Enquire' button that will either open a form submission for that particular product or if that is not possible direct them through to the contact page? 

I have been able to remove the 'Add To Cart' and add an 'Enquiry' button on product pages with the code below, but the button does not link through to anywhere? How do I get it to link through to the contact page of the website so have its own form?

Any help would be much appreciated. 
 

/* temporary no sales */

    .sqs-add-to-cart-button-wrapper {

    display: none !important;

}

.product-quantity-input:after {

  content: "ENQUIRE"; /* Replace with your desired button text */

  display: block;

  text-align: center;

  padding: 20px;

  background-color: #FF0000; /* Replace with your desired button color */

  color: #FFFFFF; /* Replace with your desired text color */

  text-decoration: none;

  border-radius: 0px;

  font-size: 16px;

  font-weight: bold;

  margin-top: 30px;

  cursor: pointer;

}

  • Replies 2
  • Views 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

CSS can not create links.

You need JavaScript to add links where no links were before or change existing ones.

I'm not sure exactly what effect you specifically  want to achieve but there are several bits of code that might get close to what you want.

Please see the following. 

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Posted (edited)
On 7/28/2023 at 12:47 AM, jessiwi said:

I want to remove my 'Add To Cart' button on ALL product pages of my website and replace with an 'Enquire' button that will either open a form submission for that particular product or if that is not possible direct them through to the contact page?

You can hide the Add to Cart buttons by adding this to the Custom CSS panel:

.sqs-add-to-cart-button-wrapper {
  display: none!important;
}

To add a link to a contact or enquiry page, you can manually add a link to the Product Description of every product. To do this:

  1. Type "Enquire" (or your choice of working) in the Product Description
  2. Select the text you've just added and then click the Link button in the text editor toolbar.
  3. In the Link Options, choose Email
  4. When a user clicks the link, it will launch the user's default email form, allowing them to type a custom email to you.
  5. (Optional) You can add some custom CSS so the link is styled like a button instead of a text link. This will be specific to your site.

That said, there are some issues with this approach:

  • You'll need to add the link to each product manually.
  • The user will not be guided about what information to provide, so the email may not provide you with the information that you require. 
  • If the user does not have email configured on their device, they will not be able to send an email.

If you'd prefer a prebuilt solution that allows you to create one form and use it for all products - and automatically includes details of the product being viewed at the time - then please take a look at our Product Enquiry Form extension.

You can choose whether products have the enquiry option only, the add to cart option only, or both buttons.

image.thumb.gif.388e52921d0a668172d866a77af11385.gif

Did this help? Please give feedback by clicking an icon below  ⬇️

Edited by paul2009

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.