Jump to content

Moved product Additional Info below Add to Cart and need help with styling

Recommended Posts

The forum help has been fantastic over the years... posting my first question and hoping someone can help me with a style issue.

I am using the Additional Info section to add a product block for the digital product that is an optional choice to a physical product. After trying a LOT of different ways to move the AI under the product description, I was able to finally get it moved in the right spot and function correctly when clicked by using  jQuery prepend to the share buttons. I think this is going to work great for us. 

<!-- START VC Move Additional Information -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
  window.Squarespace.onInitialize(Y, function(){  
  $('section.ProductItem-additional').prependTo('.Share-buttons');
});
</script>
<!-- END VC Move Additional Information -->

The issue: My button is disappearing - you can see it's there on hover and the alignment of the whole block is off. Could I get help fixing the button appearance and aligning everything to the left?

Thank you!

https://www.violetcraft.com/patterns/forest-abstractions

Edited by violetcraft
fixing title
Link to comment
  • violetcraft changed the title to Moved product Additional Info below Add to Cart and need help with styling
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 10/22/2022 at 11:58 AM, violetcraft said:

The forum help has been fantastic over the years... posting my first question and hoping someone can help me with a style issue.

I am using the Additional Info section to add a product block for the digital product that is an optional choice to a physical product. After trying a LOT of different ways to move the AI under the product description, I was able to finally get it moved in the right spot and function correctly when clicked by using  jQuery prepend to the share buttons. I think this is going to work great for us. 

<!-- START VC Move Additional Information -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
  window.Squarespace.onInitialize(Y, function(){  
  $('section.ProductItem-additional').prependTo('.Share-buttons');
});
</script>
<!-- END VC Move Additional Information -->

The issue: My button is disappearing - you can see it's there on hover and the alignment of the whole block is off. Could I get help fixing the button appearance and aligning everything to the left?

Thank you!

https://www.violetcraft.com/patterns/forest-abstractions

Change your code to this

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
   window.Squarespace.onInitialize(Y, function(){  
  $('section.ProductItem-additional').insertAfter('.ProductItem-details-share');
});
</script>
<style>
  section.ProductItem-additional {
    order: 9;
    padding-top: 0 !important;
}
section.ProductItem-additional .product-block {
    width: 100% !important;
}
section.ProductItem-additional .sqs-add-to-cart-button.sqs-editable-button {
    opacity: 1 !important;
}
</style>

 

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

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.