Jump to content

[Share] Add custom description to Product on Shop Page

Recommended Posts

You can follow these steps to add custom text to the Product on the Shop Page (like this, see screenshot)

image.png.ee7bf47e6646372b9183643a7a7bef0b.png

If you can't make code work, you can send link to Shop Page + Exact code you added, I can check easier.

#1. First, edit Shop Page > Add a Blank Section under Products

image.png.1049a12a81c6bd8a278a54cc5d0b223b.png

#2. Add some Text Blocks.

In my example, we will add text to 2 products, so we will add 2 Text Blocks

image.png.34d74263c8f4b34a5a634d0c43babb8b.png

#3. Use below tool to find ID of 2 Text Blocks

In my example, we will have:

  • Text 1: #block-yui_3_17_2_1_1721446484537_27294
  • Text 2: #block-yui_3_17_2_1_1721446484537_28268

image.png.52579b69c868b55b3a73c82b2608776a.png

#4. Find the ID of 2 Products.

In my example, we have: 

Product 1: /store-inset-sidebar/p/style-02

image.png.e56d5a44518a1cd57f7fa9f6103d7801.png

Product 2: /store-inset-sidebar/p/style-03

image.png.af8305a63c35743fa4d9abee35881828.png

Product ID will have this format

  • Product 1: div#thumb-style-02
  • Product 2: div#thumb-style-03

#5. Use this code to Code Injection – Footer (or Shop Page Header Injection)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    // Product 1
    $('#block-yui_3_17_2_1_1721446484537_27294').insertBefore('div#thumb-style-02 .plp-grid-add-to-cart');
    // Product 2
   $('#block-yui_3_17_2_1_1721446484537_28268').insertBefore('div#thumb-style-03 .plp-grid-add-to-cart');
});
</script>

image.png.52c129e484c75cfa4f517b0a62040d32.png

#6. Result

image.png.ee7bf47e6646372b9183643a7a7bef0b.png

#7. If you want to hide a Section (you created in #1), you can use #3 tool to find the Section ID.

In my example, we will have

section[data-section-id="669b30ddb256453d6371f219"]

image.png.0f38e0a19763207087e980a572a544f5.png

then use this code to Custom CSS box

section[data-section-id="669b30ddb256453d6371f219"] {
  display: none;
}

image.png.302c25e0f4f639c45fc48438224f36ed.png

If you want to make it appear in Edit Mode, use this new CSS code

body:not(.sqs-edit-mode) section[data-section-id="669b30ddb256453d6371f219"] {
  display: none;
}

image.png.e29984d45ec709c4185d2d3bf7ec0c6c.png

Edited by tuanphan

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
  • Replies 0
  • Views 277
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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.