jessiwi Posted July 27, 2023 Posted July 27, 2023 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; }
creedon Posted July 27, 2023 Posted July 27, 2023 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.
paul2009 Posted July 28, 2023 Posted July 28, 2023 (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: Type "Enquire" (or your choice of working) in the Product Description Select the text you've just added and then click the Link button in the text editor toolbar. In the Link Options, choose Email. When a user clicks the link, it will launch the user's default email form, allowing them to type a custom email to you. (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. Did this help? Please give feedback by clicking an icon below ⬇️ Edited October 9, 2023 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment