Articles on: Review Widgets

How to Insert the Star Rating Code Block Manually?

Having genuine and good product reviews is paramount to get your online store growing. With Automizely Reviews, it gets easier to import reviews from AliExpress and a CSV file to your store.

You can also add two different widgets:

Review widget
Star rating widget

Is the star rating or review widget difficult to activate?



No, both of them are super easy to activate ✌️

Login to your Automizely Reviews account
Look for the ‘Review widget’ and 'Star rating widget’ in the Display Widgets menu
Turn on the toggle button of both the widgets to activate them

Note: This process will only help you activate the star rating widget if you are using any of these themes — DEBUT, SUPPLY, BROOKLYN, BOUNDLESS, VENTURE and NARRATIVE.

What should I do in the case of different themes?



Don’t worry, if you are using any of the following themes, just tell our support team to get the star rating widget activated within 2 business days 🤟

Simple
Minimal
Express

On the off chance that you are using any other theme than the aforementioned ones, using code block is the only solution 😄

What’s the procedure to insert the star rating code block manually?



Adding star rating code block is very simple, but you have to be sure that whether you are using a “Sectioned” or a “Non-sectioned” theme.

Note: A sectioned theme is a newer theme that lets you drag and drop to arrange the layout of your store's pages.

How to identify sectioned and non-sectioned themes?

Log in to your Shopify store and go to the ‘Themes’ menu
Click on ‘Actions’ > ‘Edit code’


Look for the files in the ‘Sections’ directory. If files are there, it means you are using a sectioned theme or vice versa.

Note: Non-sectioned themes were released before October 2016, and that’s why they do not have files in the ‘Sections’ directory.

Steps to add the star rating code block to your product detail page



Go to “Themes” > Actions > Edit code

Open product-template.liquid file in the ‘Sections’ directory if you are using a sectioned theme. In case you are using a non-sectioned theme, open product.liquid file in the 'Templates’ directory.

In the code, find the area where you want the star rating widget to appear. Usually, it gets placed under the product title. To find your product title in the file, search for the {{ product.title }} Liquid tag.

Add a new line and paste this code to make the star rating widget visible on your sectioned theme:

<!--BEGIN_AM_REVIEWS:production:PRODUCT_TITLE_STAR_WIDGET-->{% if shop.metafields.automizely_reviews.show_stars_under_product_name == 'true' %}<div 
    id="automizely_reviews_product_detail_title_star_widget" 
    data-product-id="{{ product.id }}" 
    data-ratings="{{ product.metafields.automizely_reviews.ratings }}"
    data-raters="{{ product.metafields.automizely_reviews.raters }}"
    >
</div>{% endif %}<!--END_AM_REVIEWS:production:PRODUCT_TITLE_STAR_WIDGET-->

For a non-sectioned theme, you need to paste this code:

<!--BEGIN_AM_REVIEWS:production:PRODUCT_TITLE_STAR_WIDGET-->{% if shop.metafields.automizely_reviews.show_stars_under_product_name == 'true' %}<div 
    id="automizely_reviews_product_detail_title_star_widget" 
    data-product-id="{{ product.id }}" 
    data-ratings="{{ product.metafields.automizely_reviews.ratings }}"
    data-raters="{{ product.metafields.automizely_reviews.raters }}"
    >
</div>{% endif %}<!--END_AM_REVIEWS:production:PRODUCT_TITLE_STAR_WIDGET-->

Click on ‘Save’.

Note: Star rating will only appear if there's at least one product review.

Steps to add the star rating widget to your collection page



Go to “Themes” > Actions > Edit code

For the sectioned theme:

Open product-grid-item.liquid file in the ‘Snippets’ directory

Note: This file has a different name in some themes. Thus, look for these files If you do not find product-grid-item.liquid:

product-card-grid.liquid
Product-card.liquid
product-card-item.liquid
Product-block.liquid

For the non-sectioned theme:

Open product-grid-item.liquid file in the 'Snippets’ directory

In the code, find the area where you want the star rating widget to appear. Usually, it gets placed under the product title. To find your product title in the file, search for the {{ product.title }} Liquid tag.

Add a new line and paste this code to make the star rating widget appear on your sectioned theme:

<!--BEGIN_AM_REVIEWS:production:PRODUCT_COLLECTION_STAR_WIDGET-->{% if shop.metafields.automizely_reviews.show_stars_under_product_name == 'true' %}<div 
    class="automizely_reviews_product_collection_star_widget" 
    data-product-id="{{ product.id }}" 
    data-ratings="{{ product.metafields.automizely_reviews.ratings }}"
    data-raters="{{ product.metafields.automizely_reviews.raters }}"
    ></div>{% endif %}<!--END_AM_REVIEWS:production:PRODUCT_COLLECTION_STAR_WIDGET-->

For a non-sectioned theme, you need to paste this code:

<!--BEGIN_AM_REVIEWS:production:PRODUCT_COLLECTION_STAR_WIDGET-->{% if shop.metafields.automizely_reviews.show_stars_under_product_name == 'true' %}<div 
    class="automizely_reviews_product_collection_star_widget" 
    data-product-id="{{ product.id }}" 
    data-ratings="{{ product.metafields.automizely_reviews.ratings }}"
    data-raters="{{ product.metafields.automizely_reviews.raters }}"
    ></div>{% endif %}<!--END_AM_REVIEWS:production:PRODUCT_COLLECTION_STAR_WIDGET-->

Click on ‘Save’.

Note: Star rating will only appear if there's at least one product review.

Is the procedure of inserting the star rating code block going to be the same for all Shopify themes?



Not exactly!

You can insert the star rating code block with the above-mentioned procedure for maximum themes. However, the location of liquid files varies for a few themes. Don’t worry, we’ve covered the steps for the popular ones, such as:

Kalles

Kaline

Venedor

Prestige

Streamline

Debutify

In case you still face some problems or have some questions, connect with our support team now

Updated on: 13/05/2021

Was this article helpful?

Share your feedback

Cancel

Thank you!