Commerce Yotpo is Drupal Commerce module that integrates the Yotpo free plug-and-play product reviews solution for eCommerce sites into your Drupal Commerce shop.

Yotpo helps store owners generate tons of product reviews and makes it easy for them to leverage these reviews to increase traffic and sales. Yotpo is serving over 20,000 store owners across 15 different eCommerce platforms in 35 different languages.

Install yotpo-php

Download the yotpo api interface (yotpo-php) https://github.com/YotpoLtd/yotpo-php/archive/production_2013-12-17_08-48-39.tar.gz and extract it into your project sites/all/libraries folder. Rename the folder yotpo-php. You should end up with a folder sites/all/libraries/yotpo-php.

Download & enable commerce_yotpo module

Follow the usual process for downloading and enabling a drupal module. The libraries module is a dependency and will be automatically downloaded if it doesn’t already exist on your system.

Register with Yotpo

Visit https://mysite.com/admin/commerce/config/yotpo/register to register with yotpo. After registering you will be given an api key and a secret key. You will use these to connect to yotpo to retrieve reviews for your site. If the registration is successful you will be taken to the settings form.

Note (27/05/2016): Looks like CommerceGuys yotpo platform is no longer supported. The main consequence of this is that you now need to go to the Yotpo website and create an account manually. You will then be able to get the yotpo id and secret key from the yotpo settings page.

Enter Yotpo settings

https://mysite.com/admin/commerce/config/yotpo/settings
(I am assuming you have already set up your product display node with a product reference field on it and have added an image field to your product variants. If you haven't done that you will need to do so before proceeding). On the settings form you can enter the product reference field & image field.

The product reference and image field data is used to create the data array to pass to yotpo when a purchase is made.
The data passed is:

product id : node-nid e.g. node-701 etc. This is used to tie the product reviews to a particular product display node. If you change the node id for the product for some reason then you will need to notify yotpo of the changes. See this page for details
Price : taken from the line item
url : of the product display node
image : url of the image field from the product variant. If you want to use the node image instead then see issue 2347505
description : taken from node body if it is set or node->title if not.

How to add the reviews to your site

commerce_yotpo ships with three blocks:

  1. yotpo product bottom line
  2. yotpo product reviews
  3. yotpo testimonials

Adding a bottom line review to a product page

Add the yotpo product bottom line block to your content area. Now when you view your product you will get a ‘five star’ average rating displayed.
Yotpo Bottom Line

Add yotpo product reviews

Add the yotpo product reviews block to your content area. Now you will get all the product reviews associated with the product displayed.
Yotpo Product Reviews

Add a testimonials page

  1. Create a basic page with title testimonials and empty body. Tick the ‘Provide a menu link’ checkbox and attach this page to the main menu.
  2. Add the yotpo product testimonials block to the content area and configure the block. In the pages section select ‘only the specified pages’ and enter ‘node/4’ or whatever the path to your testimonials page is.

Yotpo testimonials