Jump to content

Add a secondary button in product page

Recommended Posts

Some options to achieve this

If all products use button with same link, just add it to Footer or add to Not Linked Page, then we will give code to move it next to Add to Cart on all products

If use different button, just add a Button Block in Additional Info > Then share link to a product, we will give the code to move its position.

With Example Above, they use Standard Page, not Products, so they can add anything.

 

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
  • 2 weeks later...
  • 1 year later...
On 2/6/2024 at 6:20 AM, taylorlaidlaw said:

Hi! Can you please send the code to add the second button beside the "add to cart" button? Thanks so much in advance!

All products will have a same button with same url or?

A. If same url, you can share link to a product, I will give code for all

B. If different, just edit each product > Additional Info > Add a Button Block, then following these steps to move it to add to cart

(This will run on Product Detail Only, if you need it on Store/Category Page, we will need to adjust the code)

B.1. First edit all products where you want to add second button

How To Add Button Block To Additional Info 02 Min

choose Additional Info

How To Add Button Block To Additional Info 03 Min

Add a Button Block

How To Add Button Block To Additional Info 05 Min

B.2. Use this code to Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){
  $('section.ProductItem-additional .button-block').appendTo('.sqs-add-to-cart-button-wrapper');
})
</script>

 

Edited by tuanphan

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

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.