Judge.me anchor link to reviews

Solved

Judge.me anchor link to reviews

louis__svg
Tourist
7 0 1

Hi all,

 

I'm strugling to create an anchor link on top of my product page, where the average rating + number of reviews is displayed (Picture 1), that would scroll down on the same page, to the detailed reviews section (picture 2). Those 2 atttributes both come from Judge.me app. 

 
Let me know if you can help please.

 

Thanks !
wcdce.png

 

 

 

 

rgwb.png

Accepted Solution (1)

namphan
Shopify Partner
2690 349 396

This is an accepted solution.

Hi @louis__svg,

Please go to Actions > Edit code > sections > main-product.liquid file and add code here:

Screenshot.png

Code:

<script>
  document.querySelector('#shopify-block-AS1ZiTnVJRzB0NHB6c__judge_me_reviews_preview_badge_M7Neid').addEventListener('click', (event) => {
    document.querySelector('#shopify-block-AWk9LTTRWVm8rN2F1a__judge_me_reviews_featured_carousel_FQdbFH').scrollIntoView();
  });
</script>
Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com

View solution in original post

Replies 5 (5)

Felix-Judgeme
Shopify Partner
6 2 4

Hello there,

 

Here is Felix from Judge.me Support team and thank you for sharing your concern.

 

In order for my team & I to re-check before delivering the most suitable assistance, can you kindly reach us out via our address "support@judge.me" with the URL of the page where you took the screenshot.

 

In case your store has a password protection, simply share it with us so we can access your site temporarily and provide a proper solution to meet your expectation.

 

Looking forward to hearing from you.

StephenAbiola
Visitor
3 0 0

 

Step 1: Find or Add an ID to the Reviews Section (Picture 2)

In your main-product.liquid or wherever Judge.me reviews are rendered, you’ll see something like this:

 

liquid
CopyEdit
{% render 'judgeme_widgets', widget_type: 'judgeme_review_widget', ... %}

 

 

Wrap that in a div like this:

 

liquid
CopyEdit
<div id="judgeme_reviews_section"> {% render 'judgeme_widgets', widget_type: 'judgeme_review_widget', ... %} </div>

 

 

Or if there's already a container you can use, just add the id="judgeme_reviews_section" to it.


Step 2: Turn the Review Summary into a Link (Picture 1)

Wherever this part is being rendered:

 

liquid
CopyEdit
<span class="jdgm-preview-badge" data-id="{{ product.id }}"></span>

 

 

Wrap it like this:

 

liquid
CopyEdit
<a href="#judgeme_reviews_section" class="scroll-to-reviews"> <span class="jdgm-preview-badge" data-id="{{ product.id }}"></span> </a>
 

This turns the star rating / review count into a clickable link.

To ensure smooth scroll and prevent jumping, reach out below so i can give you a custom code to input

You can reach me on WhatsApp
+2347082454926 and Telegram @Stephendarasimi
louis__svg
Tourist
7 0 1

Thanks but the thing is I'm unable to locate where in the code the  Judge.me reviews are rendered.

I've tried the main liquids but couldn't find it..

StephenAbiola
Visitor
3 0 0

can you reach out below, that's the only way i can help at least

You can reach me on WhatsApp
+2347082454926 and Telegram @Stephendarasimi

namphan
Shopify Partner
2690 349 396

This is an accepted solution.

Hi @louis__svg,

Please go to Actions > Edit code > sections > main-product.liquid file and add code here:

Screenshot.png

Code:

<script>
  document.querySelector('#shopify-block-AS1ZiTnVJRzB0NHB6c__judge_me_reviews_preview_badge_M7Neid').addEventListener('click', (event) => {
    document.querySelector('#shopify-block-AWk9LTTRWVm8rN2F1a__judge_me_reviews_featured_carousel_FQdbFH').scrollIntoView();
  });
</script>
Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com