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

Commerce - moving additional info on all but one page


kirstym

Question

Site URL: https://www.chococake.co.uk/

Hey,

I've used jQuery to move the Additional Info of my products up to the product description area using the code below (from this post):
 

<script>
  jQuery(document).ready(function($) {
$('.ProductItem .ProductItem-additional').insertAfter('.ProductItem-details-excerpt');
});
</script>

I'm wondering if anyone knows how to disable this on a single product. I've looked into not selectors but unfortunately my coding brain has peaked!

The specific product page I would like it in it's original location is:
https://chococake.squarespace.com/shop-for-collection/p/box-of-chococo-chocolates

Thanks for your help!

Link to post
  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Popular Posts

Site URL: https://www.chococake.co.uk/ Hey, I've used jQuery to move the Additional Info of my products up to the product description area using the code below (from this post):   <sc

Each product has it own id, in your case, update the snippet to make it stay where it were Squarespace ID Finder - Chrome Web Store (google.com) <script> jQuery(document).ready(functio

This line target all the page that DID NOT have the specific id, and move the text accordingly, it a javascript syntax if (!$("body").is("#item-6065a9ba00c5a575a39fbe31")) {

Posted Images

3 answers to this question

Recommended Posts

  • 0
7 minutes ago, kirstym said:

Site URL: https://www.chococake.co.uk/

Hey,

I've used jQuery to move the Additional Info of my products up to the product description area using the code below (from this post😞
 

<script>
  jQuery(document).ready(function($) {
$('.ProductItem .ProductItem-additional').insertAfter('.ProductItem-details-excerpt');
});
</script>

I'm wondering if anyone knows how to disable this on a single product. I've looked into not selectors but unfortunately my coding brain has peaked!

The specific product page I would like it in it's original location is:
https://chococake.squarespace.com/shop-for-collection/p/box-of-chococo-chocolates

Thanks for your help!

 

9 minutes ago, kirstym said:

Site URL: https://www.chococake.co.uk/

Hey,

I've used jQuery to move the Additional Info of my products up to the product description area using the code below (from this post😞
 

<script>
  jQuery(document).ready(function($) {
$('.ProductItem .ProductItem-additional').insertAfter('.ProductItem-details-excerpt');
});
</script>

I'm wondering if anyone knows how to disable this on a single product. I've looked into not selectors but unfortunately my coding brain has peaked!

The specific product page I would like it in it's original location is:
https://chococake.squarespace.com/shop-for-collection/p/box-of-chococo-chocolates

Thanks for your help!

Each product has it own id, in your case, update the snippet to make it stay where it were

Squarespace ID Finder - Chrome Web Store (google.com)

<script>
 jQuery(document).ready(function($) {
    if (!$("body").is("#item-6065a9ba00c5a575a39fbe31")) {
        	$('.ProductItem .ProductItem-additional').insertAfter('.ProductItem-details-excerpt');
    }
});
</script>

image.png.5b74018ec28867139123767f7e7d1e38.png

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, 360 Degree Photo block, Animated Heading Block
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to post
  • 0

Hey, thank you so much for the updated code and the explanation. That works perfectly!
If you don't mind, are you able to explain why it works?

I understand targeting the specific product using the item id, but how does the code work? But by my logic, it reads that the code would apply moving the additional details ONLY on that page, rather than not on that page. Does that make sense?

You don't have to reply, it works fine and thank you so much! I'm just curious.

Link to post
  • 0
11 hours ago, kirstym said:

Hey, thank you so much for the updated code and the explanation. That works perfectly!
If you don't mind, are you able to explain why it works?

I understand targeting the specific product using the item id, but how does the code work? But by my logic, it reads that the code would apply moving the additional details ONLY on that page, rather than not on that page. Does that make sense?

You don't have to reply, it works fine and thank you so much! I'm just curious.

This line target all the page that DID NOT have the specific id, and move the text accordingly, it a javascript syntax

if (!$("body").is("#item-6065a9ba00c5a575a39fbe31")) {

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, 360 Degree Photo block, Animated Heading Block
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...