Jump to content

Code to move item from 'Additional Information' to below product description

Go to solution Solved by tuanphan,

Recommended Posts

Posted

Hi all.

I see this topic has been discussed a few times but I can't see a solution that fits. I wonder is anyone can help?

I have a social share tool (AddThis) embedded via a code block in the additional information section of a product page. I've used Json to move this into the product description, but I cannot place it where I want it to be.

Here is a screenshot of what I am trying to achieve and the code I have used within Code Injection -> Footer.

<!--- Moving Social Share Icons into description -------------->
<script>
  $(document).ready(function() { 
        $('section.ProductItem-additional').insertAfter('.ProductItem-details-excerpt');
    });
</script> 

image.thumb.jpeg.9b2b7193b6725fa4a4dd743e488d8f75.jpeg

 

URL - https://fiona-mcdonald.squarespace.com/collections/p/claude-bench
Password - fiona

If anyone knows the correct class to place it after, or reference to information, I would be hugely grateful.

Thanks in advance
Tom 

  • Replies 4
  • Views 530
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Try this:

<!--- Moving Social Share Icons into description -------------->
<script>
  $(document).ready(function() { 
        $('section.ProductItem-additional').insertAfter('.ProductItem-details-checkout');
    });
</script> 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted (edited)

@Ziggy Thank you for your comment. No joy unfortunately. It moves it above the title.

I do also have a product enquiry form plugin that i am using to replace the 'add to cart'. FYI incase that code may be conflicting with this??

Thanks again 

image.thumb.png.ee812361b1b5c3343835810c6b649e84.png

Edited by TomLeMesurier4567
  • Solution
Posted

Use this

<!--- Moving Social Share Icons into description -------------->
<script>
  $(document).ready(function() { 
        $('section.ProductItem-additional').insertAfter('.sqs-add-to-cart-button-wrapper>div');
    });
</script>
<style>
  .sqs-add-to-cart-button-wrapper:not([class*="sf"]) {
    display: block !important;
    order: 5 !important;
}
  .sqs-add-to-cart-button-wrapper:not([class*="sf"]) .sqs-add-to-cart-button {
    display: none !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!)

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.