Jump to content

Add to cart button & location

Recommended Posts

First, remove this line from Code Injeciton

Quote

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Next, 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() { 
		$('div#productNav').appendTo('div#productGallery');
	});
</script>
<style>
  div#productNav {
    margin-top: 20px;
}
  div.sold-out div#productSlideshow:before {
    content: "SOLD OUT";
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 9999;
    display: block;
    background-color: black;
    color: white;
    padding: 10px;
}
  div.sqs-add-to-cart-button.sqs-suppress-edit-mode {
    padding: 10px 20px !important;
}
  div.sqs-add-to-cart-button.sqs-suppress-edit-mode * {
    font-size: 14px !important;
}
</style>

 

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
15 hours ago, dcbachar said:

The code works great! Thank you. Only one small problem. There's now 2 "SOLD OUT" blocks. Just need to delete/hide the block on the right.

220314_Capture.JPG

Add this to Code Injection

<style>
  #productDetails .product-mark.sold-out {
    display: none;
}
</style>

 

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.