A2Reviews
  • What is A2Reviews APP?
  • Installation Guides
    • How to install A2Reviews Chrome extension?
    • Add A2Reviews snippet code manually in Shopify theme
    • Enable A2Reviews blocks for your Shopify's Online Store 2.0 themes
      • Check my theme is Shopify 2.0 OS
    • The source code of the files
    • Integrate A2Reviews into product pages in Pagefly
  • My Reviews
    • Dashboard & Manage the list of reviews
    • Actions on the products list page
    • A2Reviews Block
    • Create happy customer page
    • Import reviews from Amazon, AliExpress
    • Import Reviews From CSV file
    • How to export and backup reviews to CSV
    • Add manual and bulk edit reviews with A2reviews editor
    • Product reviews google shopping
      • How to build product reviews feed data with A2Reviews
      • How to submit product reviews data to Google Shopping
    • Translate reviews
  • Media
    • Images management
    • Videos management
    • Insert photos and video to review
  • Reviews request
    • Overview
    • Customers
    • Reviews request
    • Email request templates
  • Store Plans
    • Pricing
    • Subscriptions management
      • How to upgrade your store plan?
      • How to cancel a store subscription
  • Settings
    • Global settings
      • Email & Notifications Settings
      • Mail domain
      • CSV Reviews export profile
      • Import reviews
    • Languages on your site
    • Reviews widget
    • Questions widget
    • Custom CSS on your store
    • My Account
Powered by GitBook
On this page
  • Shopify theme basic standards
  • Shopify theme ONLINE STORE 2.0
  1. Installation Guides

Add A2Reviews snippet code manually in Shopify theme

Shopify theme basic standards

Some reasons that A2Reviews cannot add snippet code to your Shopify theme, you can do it manually.

* Display total reviews widget on the product page:

In your theme, open this file sections/product-template.liquid. Add snippet code below to anywhere want to display total reviews.

{% include 'a2reviews-total' %}
Or
{% render 'a2reviews-total' product:product %}

* Display total reviews widget on the collection page:

Each Shopify theme can have different file names to display the product list on the collection page. Find a suitable position to display total reviews. Snippet code below you can add.

{% include 'a2reviews-total' type:'collection' %} (new version)

Or (commonly used with product loops using ajax)
{% render 'a2reviews-total' type:'collection' product:product %} (new version)

In old version
{% render 'a2reviews-collection-total' product:product %} (Removed)

* Main reviews / QA widget snippet code, (Mostly added in the file templates/product.liquid)

{% include 'a2reviews-widget' %}
Or
{% render 'a2reviews-widget' product:product %}

QA Widget Snippet Code

{% include 'a2reviews-widget' type:'QA' %} (new version)
{% include 'a2reviews-qa-widget' %} (Removed)

or

{% render 'a2reviews-widget' type:'QA' product:product %} (new version)
{% render 'a2reviews-qa-widget' product:product  %} (Removed)

Shopify theme ONLINE STORE 2.0

Online Store 2.0 is a set of features and feature improvements that make themes and theme apps easier to build, more flexible, and easier to maintain.

Many Online Store 2.0 features rely on JSON templates. You can migrate a theme's templates to add support for these features by converting a Liquid template into a JSON template, and moving any required Liquid code or HTML into sections that you can include in the new JSON template.

For Online Store 2.0 theme, setting widget display on product page will be added in templates/product.json file. With the general A2Reviews application will be added with the reference example below.

Example templates/product.json file

{
  "sections": {
    "main": {
      "type": "main-product",
      "blocks": {
        "vendor": {
          "type": "text",
          "settings": {
            "text": "{{ product.vendor }}",
            "text_style": "uppercase"
          }
        },
        "title": {
          "type": "title",
          "settings": {
          }
        },
        "a2reviews-total-widget": {
          "type": "custom_liquid",
          "settings": {
            "custom_liquid": "{% render 'a2reviews-total' product:product %}"
          }
        },
        "subtitle": {
          "type": "text",
          "settings": {
            "text": "Free Shipping over 99$",
            "text_style": "subtitle"
          }
        },
        ....
      },
      "block_order": [
        "vendor",
        "title",
        "a2reviews-total-widget",
        "subtitle",
        .........
      ],
      "settings": {
        "enable_sticky_info": true,
        "hide_variants": false,
        "enable_video_looping": false
      }
    },
    "product-recommendations": {
      "type": "product-recommendations",
      "settings": {
      }
    },
    "a2reviews-main-widget": {
      "type": "a2reviews-main-widget",
      "settings": {
      }
    },
  },
  "order": [
    "main",
    "product-recommendations",
    "a2reviews-main-widget"
  ]
}
PreviousHow to install A2Reviews Chrome extension?NextEnable A2Reviews blocks for your Shopify's Online Store 2.0 themes

Last updated 3 years ago

Read More