How to add the eRated Social Trust Badge Plug-in for User Profiles


This article will show you how you can integrate the  https://www.erated.co/ badge to display the social proof of users (buyers and sellers) who register on your marketplace.

Step 1

Head over to  erated.co and sign up to get your unique marketplace code (which you will use to insert in the javascript widget we provide below)

Step 2

In your marketplace, go to  MPO Admin Dash > Theme > Content Holders

Step 3

Create or edit an existing HEAD content holder (Case Sensitive, type in HEAD for a global content holder that will inject your content in the head of web pages). 

Ensure this is included in the HEAD (case sensitive) content holder: <script src="//cdn.erated.co/iframe/erated_imp.js" async></script>

Step 4

Go to the Liquid Views option ( MPO Admin Dash > Theme > Liquid Views)

And edit the various User Badge liquid views.

This example is for the Registrations > Profile > User Badge

But you can edit the Buyer / Seller views as and if needed also.

Add the following Javascript to the  Registrations > Profile > Header Liquid View , and insert the https://www.erated.co/ key that you were supplied by erated.co  where you see the "key" noted in the code below.

{% if is_current_user %}
 <script type="text/javascript">
           window.erated = {
               "config": {
                   "align": "vertical",
                   "color": "#12B2B2",
                   "color_set": {
                       "rating_stars": "#009898",
                       "characteristics": "#42C9E5",
                       "review_circle": "#12B2B2",
                       "score_circle": "#12B2B2",
                       "small_score_circle": "#ffffff",
                       "score_text": "#000000"
                   },
           "key": " insert the key provided by erated for this marketplace. Including the quotes around it",
                   "locale": "en",
                   "mode": "slider",
                   "privacy": {
                       "firstNameOnly": false
                   },
                   "reputationMode": "marketplaces",
                   "view": "seller",
                   "width": 300,
                   "headless": false,
                   "slider_interval": 5
               },
               "userData": {
               "name": "{{ user.first_name }} ",
               "sha1Email": "{{ user.email | sha1}}",
               }
           };
       </script>
       <div></div>
  {% else %}
     <script type="text/javascript">
           window.erated = {
               "config": {
                   "align": "vertical",
                   "color": "#12B2B2",
                   "color_set": {
                       "rating_stars": "#009898",
                       "characteristics": "#42C9E5",
                       "review_circle": "#12B2B2",
                       "score_circle": "#12B2B2",
                       "small_score_circle": "#ffffff",
                       "score_text": "#000000"
                   },
                   "key": " insert the key provided by erated for this marketplace. Including the quotes around it ",
                   "locale": "en",
                   "mode": "slider",
                   "privacy": {
                       "firstNameOnly": false
                   },
                   "reputationMode": "marketplaces",
                   "view": "buyer",
                   "width": 300,
                   "headless": false,
                   "slider_interval": 5
               },
               "userData": {
                  "name": "{{ user.first_name }} ",
                  "sha1Email": "{{ user.email | sha1}}",
               }
           };
       </script>
       <div></div>
    {% endif %}
<br>