To begin, please pull up your account in the Shopper Approved dashboard.

1. Step One 

Product Feed

We will need you to send us a product feed that contains all of your products. An example product feed can be found here.

2. Step Two 

Product Reviews Thank you Page Bolt-on

You will then need to add in code for the product. What you need to do is create a variable called sa_products and populate that variable with the correct key value pairs for your cart. What it needs to do is get the product that the customer purchased and populate sa_products with the product id of that product. All carts are different, so you will have to populate the variable the way your cart needs.

Here is a video of where You can find our example code that we have in the dashboard. Please also see the Shopify example below.

<script type="text/javascript">
var sa_products = {}; //declare sa_products object
var itemtitle; //set variable for product name
{% for line_item in line_items %} //start for loop to loop through all products purchased
itemtitle = (function () {/*{{ line_item.title }}*/}).toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1]; //remove all special characters from product name
sa_products['{{ line_item.variant_id }}'] = itemtitle; //populate sa_products object with key value pair of 'productid':'productname'
{% endfor %} //end for loop

The final format of sa_products after your code has populated the product data should be the following:
sa_products = {'productID':'productName'};

3. Step Three

Category code

Get the Product Category code from the Shopper Approved Control Panel for your site. There are two parts. The first only needs to be on the category pages once. See video here.

The second (the div) will need to go in the place where the stars are going to appear, see here.

4. Step Four

Product Page Just Stars Code

Retrieve the product page stars code by going to the Shopper Approved control panel and grabbing the code seen here.

Please note: You will have to replace the [PRODUCT ID] placeholder anywhere you place this code.

5. Step Five

Product Page Product Widget

We will then need to get our product review widget on the page. You can retrieve that from here.

You will then need to place it so that it shows at the place you would like on your site. This is where your product reviews will show on your product pages.

Height will vary based on review length and other factors, and is okay to change. Because of this, you may need to make a container to sit it in if the theme doesn`t allow the widget to space itself properly. Very similar to this page.

Please note: You will have to replace the [PRODUCT ID] placeholder anywhere you place this code.

Did this answer your question?