I am using the Judge.me Product Reviews app to add product ratings/reviews and also started using it for website pages where users can rate and review local businesses we support.
An example of this page: https://www.homegrownmkt.com/pages/wetheloft
Using the apps support team I was told the only way I can do this is to create a product and then render the review widget of that product on that page by adding custom liquid for the page:
{% if page.handle == “wetheloft” %}
{% render ‘judgeme_widgets’, widget_type: ‘judgeme_review_widget’, concierge_install: true, product: all_products[“wetheloft”] %}
{% endif %}
The issue is everytime I create a new business page I have to add to this code so that the reviews are shown.
Given that the product and page id are always the same is there a way where I can add a code that checks the page id and then renders the review for that product with the same id? Just so I dont have to add custom liquid every time.
Hi @nalnowaeam ,
You want when you create a new business page and the rating/reviews code is still displayed with the same product.
I have checked and the page you are using with template 2.0 so it is possible to create a new template with pages that want to display ratings/reviews. Refer https://www.youtube.com/watch?v=VcR34I4BN6Q
Then you just need to add the custom code:
{% render 'judgeme_widgets', widget_type: 'judgeme_review_widget', concierge_install: true, product: all_products["wetheloft"] %}
You don’t need to add the condition, it will work fine.
Hope it helps!
No I have to create a new product each time so that each business has its own ratings so thats why I need a code to check the business page and then render review widget for the product with the same product handle
Hi @nalnowaeam ,
Please change code:
{% assign handle = page.handle %}
{% render 'judgeme_widgets', widget_type: 'judgeme_review_widget', concierge_install: true, product: all_products[handle] %}
So you just need to create the product with the same handle as the page handle and choose the newly created template for the pages you want to display ratings/reviews, it will work fine.