jackcavell Posted July 16, 2019 Share Posted July 16, 2019 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> Link to comment
paul2009 Posted July 16, 2019 Share Posted July 16, 2019 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 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. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
tuanphan Posted July 16, 2019 Share Posted July 16, 2019 @jackcavell Can you share your site url? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
jackcavell Posted July 16, 2019 Author Share Posted July 16, 2019 Thank you for the response, the site is still in early stages but link is below https://parakeet-radish-lrza.squarespace.com password: nms123 Link to comment
jackcavell Posted July 16, 2019 Author Share Posted July 16, 2019 The site is still in early stages but link is below https://parakeet-radish-lrza.squarespace.com password: nms123 Link to comment
tuanphan Posted July 16, 2019 Share Posted July 16, 2019 @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>"); Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
jackcavell Posted July 16, 2019 Author Share Posted July 16, 2019 That hasn't worked unfortunately Link to comment
tuanphan Posted July 16, 2019 Share Posted July 16, 2019 @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> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
jackcavell Posted July 16, 2019 Author Share Posted July 16, 2019 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! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.