Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
jackcavell

Redirect Quick View button on product page to Add To Cart

Question

Any ideas? Hoping for an add to cart button on a product page and this is my best bet

Someone sent me the below, which didnt work


<script>
      $(function() {
        $("#item-5d2755ebe6b58600010e5dea .sqs-product-quick-view-button").replaceWith("<div class="sqs-add-to-cart-button-inner">Add To Cart</div>");        
      });
      </script>


Edited by jackcavell
Initial Revision

Share this post


Link to post

8 answers to this question

Recommended Posts

  • 0

The code posted above is unique and will only work on the site it was intended for. Please help us to help you by including a working link to a product on your website so that we can see what you are trying to achieve, the template you are using and the settings in use.

If your site isn't live yet, please check the visibility settings to ensure we can view the site content. If the site is still in trial mode you will need to set a site password and tell us what it is.

-Paul

Squarespace Expert & Professional Developer


sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi, I'm Paul, founder of SF Digital, a specialist company building the features that Squarespace didn't include
I am a Squarespace Developer and Squarespace Circle Leader with a
strong reputation on the Squarespace Forum. I'm trusted by thousands of Squarespace users worldwide, including designers, freelancers, business owners and agencies. My extensions add capabilities to Squarespace websites around the globe. They include the Enquiry Form ExtensionDatepicker Extension and Age Verification ExtensionNeed a custom Squarespace extension? Tell me about the functionality you need. Note that some links in my posts may be affiliate links. Book a Squarespace Expert when you need help.

Share this post


Link to post
  • 0

@jackcavell


try replace:
$("#item-5d2755ebe6b58600010e5dea .sqs-product-quick-view-button").replaceWith("<div class="sqs-add-to-cart-button-inner">Add To Cart</div>");    

with

$(".sqs-product-quick-view-button").replaceWith("<div class="sqs-add-to-cart-button-inner">Add To Cart</div>");    





You can send your question to my email to get faster answer.

How to Setup Password & Share URL  Squarespace Customer Care

Share this post


Link to post
  • 0

@jackcavell try


 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
       $(function() {
         $(".sqs-product-quick-view-button").replaceWith("<div class="sqs-add-to-cart-button-inner">Add To Cart</div>");        
       });
       </script>



You can send your question to my email to get faster answer.

How to Setup Password & Share URL  Squarespace Customer Care

Share this post


Link to post
  • 0

Nothing, it's still just opening quick view

I'm open to any other suggestions for showing an add to cart button for each product, this just seamed like the easiest option but maybe not!

Share this post


Link to post

Create an account or sign in to comment

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


×
×
  • Create New...