Jump to content

Move additional product info to under product description

Recommended Posts

57 minutes ago, MKrause18 said:

I put the twcsl and the code into the Page Header Code Injection

twcsl is not installed correctly.

ScreenShot2023-04-26at12_25_09PM.png.26c62524f511e8f8eb7f5827001916a1.png

This indicates to me that you missed Step 2 of the Paid Plan Install Steps or it wasn't done correctly.

Please see Adding links to your navigation - Add a link.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
2 hours ago, creedon said:

twcsl is not installed correctly.

ScreenShot2023-04-26at12_25_09PM.png.26c62524f511e8f8eb7f5827001916a1.png

This indicates to me that you missed Step 2 of the Paid Plan Install Steps or it wasn't done correctly.

Please see Adding links to your navigation - Add a link.

Oops! That is fixed now. Still unsure of the next steps, I put the "move product detail additional info first n blocks to end of product details.html" into Store Settings > Advanced > Page Header Code Injection for the store page.

Link to comment
1 hour ago, MKrause18 said:

That is fixed now.

Now you need Step 3.

  • Step 3

    Add the following to Settings > Advanced > Code Injection > HEADER.

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
    <script src="/s/twcsl.js"></script>

 

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
1 hour ago, MKrause18 said:

Oh gosh, today is not my day. I had that in and then deleted it. I think everything is in the right place now, 

It is and it's working!

ScreenShot2023-04-26at7_08_55PM.thumb.png.07445328b99259fc83574db934c7b016.png

A note from the code.

Quote

 

this effect is not active in SS Preview. to test it use private browsing < https://bit.ly/3f6lhq2 >

 

Are you going to want to get rid of quantity and Purchase? If so would this be for every product in your Store?

As to changing the Amazon button itself. Unless Amazon provides a configurator or an attribute that you can throw on the div you show in the code, I don't think it will be possible to change the text.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 4 months later...

Hi Squarespace friends! @creedon @tuanphan 

I am seeking your help, I tried implementing a few of these codes but still seem to be missing something. I am wanting to move the "additional information" section on this product so the booking calendar section appears before the quantity and add to cart sections. Any help is so appreciated!!! 🙏

https://www.alexandra-lyon.com/offerings/p/inner-wisdom-session

image.thumb.png.5286896d9ccdf172c9d04b1899f35b62.png

Link to comment
On 9/5/2023 at 4:06 AM, GretchenElizabeth said:

Hi Squarespace friends! @creedon @tuanphan 

I am seeking your help, I tried implementing a few of these codes but still seem to be missing something. I am wanting to move the "additional information" section on this product so the booking calendar section appears before the quantity and add to cart sections. Any help is so appreciated!!! 🙏

https://www.alexandra-lyon.com/offerings/p/inner-wisdom-session

image.thumb.png.5286896d9ccdf172c9d04b1899f35b62.png

Do this for all products or 1 product in screenshot only?

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

Hi @tuanphan

I am moving the accordion to the product description using code: 

 

<script>

(function(){

  var accordion = document.querySelector('.ProductItem-additional .accordion-block');

  var quantitylabel = document.querySelector('.quantity-label');                    

  

  if(accordion && quantitylabel) {

    // Remove accordion from current position.

    accordion.parentNode.removeChild(accordion);

    

    // Add accordion before the quantity label.

    quantitylabel.before(accordion);

  }

})()

</script>

Works perfectly on live website but disappears on mobile. Any ideas please?

URL:https://www.potsandpaperbysteph.com/shop/p/o3rmu4pac0fwpetkskvge721p57asg
Password: HELP

Link to comment
On 9/5/2023 at 4:06 AM, GretchenElizabeth said:

Hi Squarespace friends! @creedon @tuanphan 

I am seeking your help, I tried implementing a few of these codes but still seem to be missing something. I am wanting to move the "additional information" section on this product so the booking calendar section appears before the quantity and add to cart sections. Any help is so appreciated!!! 🙏

https://www.alexandra-lyon.com/offerings/p/inner-wisdom-session

image.thumb.png.5286896d9ccdf172c9d04b1899f35b62.png

Add to Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){
  $('body#item-64f25aa4651cc5686aa3019b section.ProductItem-additional').appendTo('.ProductItem-details-excerpt');
})
</script>

image.thumb.png.efbfc8cfed34d0d10b35939cccd69358.png

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
9 minutes ago, PotsandPaperbySteph said:

Hi @tuanphan

I am moving the accordion to the product description using code: 

 

<script>

(function(){

  var accordion = document.querySelector('.ProductItem-additional .accordion-block');

  var quantitylabel = document.querySelector('.quantity-label');                    

  

  if(accordion && quantitylabel) {

    // Remove accordion from current position.

    accordion.parentNode.removeChild(accordion);

    

    // Add accordion before the quantity label.

    quantitylabel.before(accordion);

  }

})()

</script>

Works perfectly on live website but disappears on mobile. Any ideas please?

URL:https://www.potsandpaperbysteph.com/shop/p/o3rmu4pac0fwpetkskvge721p57asg
Password: HELP

I'm not familiar with JavaScript. if you don't mind using jQuery like comment above for @GretchenElizabeth, I will send new code

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
9 hours ago, tuanphan said:

Add to Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){
  $('body#item-64f25aa4651cc5686aa3019b section.ProductItem-additional').appendTo('.ProductItem-details-excerpt');
})
</script>

image.thumb.png.efbfc8cfed34d0d10b35939cccd69358.png

AMAZING!! Worked like a charm. I am so grateful for your help!! Thank you so much @tuanphan  🙏

Link to comment
  • 2 months later...
43 minutes ago, WildSpace said:

I followed

Please move the jquery line before the twcsl code. twcsl is dependant on jQuery.

  • Step 1

    Add the following to Settings > Developer Tools > Code Injection > HEADER.

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
     
  • Step 2

    In your web browser visit the following URL.

    https://d1j8mu9lowy9zf.cloudfront.net/twcsl/0.3.2/twcsl.html
    
     

    The twcsl.html file will display in your browser.

  • Step 3

    Copy the entire contents of the page and add it to Settings > Developer Tools > Code Injection > HEADER after the previously installed code. jQuery must be before the twcsl code.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
1 hour ago, WildSpace said:

I placed the jquery line before the twcsl code. I hope!

It appears the codes are now installed in the correct order.

Now the issue is that my code was last updated almost two years ago and SS has made changes since then. I need to update my code. If you set your layout for the detail page to Simple, it should work now. But obviously if you want to use a layout other than Simple, then you'll need to wait for an update.

Please give me several days to update my code. If you don't hear back from me, please bump this thread.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Thanks so much for looking into this @creedon

I do have the layout set to simple already but unfortunately it's still not bringing the additional info up & below the product description. 

I do have some other CSS code which is hiding the 'Add to Cart' & 'Quantity' sections so not sure if that is interfering somehow. 

 

Link to comment
6 minutes ago, WildSpace said:

I do have the layout set to simple already but unfortunately it's still not bringing the additional info up & below the product description.

I'll dig a bit further. I see that you are indeed in using Simple layout.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
Quote

I'll dig a bit further. I see that you are indeed in using Simple layout.

Ah ha. The code is working! I can see that it has moved one image block up under the hidden add to cart button.

ScreenShot2023-11-14at9_21_26PM.thumb.png.855da84d0a2bf299dc26231577366f0b.png

 

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.