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

Positioning Shopify Buy Button for Products


Riccardi

Question

Hello,

I'm currently building out an e-commerce website for our fashion boutique and we're finalizing some technicalities. We currently use Shopify as our inventory database (because Stripe sucks) and we display our product via Squarespace. I've linked each product with an individual Shopify buy button, adding the code to the product's "Additional Information" section. Everything is smooth and the checkout process has no problems, but the biggest problem is the spacing between the description of the product & the positioning of the buy button. You can clearly see it in the screenshots. 

Is there a way I can pad the code to move it up or add the code in a way to have the Shopify buy button directly under the product description?
Adding spacers and other blocks do not help.

Thank you!

buybutton.JPG

buybutton1.JPG

Link to comment

Recommended Posts

  • 0
19 hours ago, HWE said:

Hi, I am also having issues with this... I would like the buy button to appear underneath the price on my product pages, https://www.hotwireextensions.com/shop/p/natural-random-light

Also, does this code go on each individual product page or on the Design > Custom CSS section?

Any help much appreciated!

Edit Code Block (Where you insert Shopify Code) > Add this code to top of Code Block

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() { 
		$('section.ProductItem-details').append($('section.ProductItem-additional .code-block'));
	});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0

Remove above & use this

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() { 
		$('section.ProductItem-additional .code-block').insertAfter('.ProductItem-product-price');
	});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0

hello @tuanphanI'm wondering if you can help me too?

I inserted your code above my shopify button however, it seems it's not aligned to my content. Is there something I need to amend to make it align? Preferably next to the quantity button on the right hand side?

 

here's my test product

image.thumb.png.dd74f53d6dab413d00af3aa8cfdf300f.png

Link to comment
  • 0
On 10/22/2020 at 10:48 AM, kwalk said:

hello @tuanphanI'm wondering if you can help me too?

I inserted your code above my shopify button however, it seems it's not aligned to my content. Is there something I need to amend to make it align? Preferably next to the quantity button on the right hand side?

 

here's my test product

Can you share link to test product?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0
On 5/27/2022 at 11:33 AM, sundayyy said:

@tuanphan Could you help me with this too? Here are the changes I'm trying to make: Move the product details up to align with the top of the image, move Shopify add to cart button to just below product description, hide cart. Here's the url: https://bluish.ca/baby-and-kids/p/baby-isla Thank you!

 

Screen Shot 2022-05-27 at 12.51.09 AM.png

Add to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
  $(document).ready(function() { 
		$('section.ProductItem-additional .code-block').appendTo('.ProductItem-details-checkout');
	});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0
On 5/29/2022 at 3:07 AM, tuanphan said:

Add to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
  $(document).ready(function() { 
		$('section.ProductItem-additional .code-block').appendTo('.ProductItem-details-checkout');
	});
</script>

 

Thank you @tuanphan! How about the space above the product title? How can I move the product details on the right side to be top aligned with the image on the left? Thanks again!!

Link to comment
  • 0
On 5/31/2022 at 1:23 AM, sundayyy said:

Thank you @tuanphan! How about the space above the product title? How can I move the product details on the right side to be top aligned with the image on the left? Thanks again!!

#1. Add to Design > Custom CSS

/* padding above product title */
section.product-details.ProductItem-details {
    padding-top: 0px;
}

#2. You mean all element will stacked with

breadcrumb

image

description

Is this right?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0
On 5/31/2022 at 11:25 PM, tuanphan said:

#1. Add to Design > Custom CSS

/* padding above product title */
section.product-details.ProductItem-details {
    padding-top: 0px;
}

#2. You mean all element will stacked with

breadcrumb

image

description

Is this right?

Yes that's right!

On mobile though, how can I move the price so that it's just below the product name? Please see picture. Same link as before.

Thank you @tuanphan!

Screen Shot 2022-06-07 at 11.59.21 AM.png

Link to comment
  • 0
On 6/7/2022 at 11:02 PM, sundayyy said:

Yes that's right!

On mobile though, how can I move the price so that it's just below the product name? Please see picture. Same link as before.

Thank you @tuanphan!

Screen Shot 2022-06-07 at 11.59.21 AM.png

The product url doesn't work now. Can you check it again?

https://bluishblog.squarespace.com/baby-and-kids/p/baby-isla

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0
On 6/28/2022 at 4:47 AM, sundayyy said:

@tuanphan I'm sorry, the page was temporarily disabled. It works now. Looking forward to your help.

Thank you!

 

Add to Design > Custom CSS

@media screen and (max-width:767px) {
.ProductItem-product-price {
    order: 0 !important;
    margin-bottom: 0 !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0

Hi! For some reason none of these codes are working when I go to inject it into the 'additional info' section. It says the script is disabled - any recommendations on what to do? I would like the button to be moved up directly under the details of the product. Not sure if I am putting the code in the wrong place or if the code just does not work for my website.

 

See website here: https://www.kuzyk.co/shop/p/denim-lilly-b-dress

Screen Shot 2022-07-11 at 11.39.09 AM.png

Link to comment
  • 0
1 hour ago, oliviac said:

For some reason none of these codes are working when I go to inject it into the 'additional info' section. It says the script is disabled - any recommendations on what to do? I would like the button to be moved up directly under the details of the product.

Personally, I don't recommend any of the code snippets in this thread (as I explained above) because they are likely to slow down your website even further than the Shopify code

That said, to test code first check that your Code Block is set to HTML. Then test it by browsing the website from another browser or a private browser window - without logging on to the site.

Improve your online store with our extensions.
About: Sqsp Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Expert and founder of SF Digital, dedicated to improving websites by building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

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...