- DarkLight
Adobe Commerce 1: Installing Yotpo Reviews
- DarkLight
This guide will walk you through the process of integrating the Yotpo Reviews app into your Adobe Commerce store.
To ensure the installation process goes smoothly, we recommend that you follow the instructions carefully and do not skip any of the steps.
Before you start
Before you get started, we recommend checking the Supported Platforms guide to ensure your hosted eCommerce platform and version are supported by Yotpo.
Installing Yotpo Reviews
Step 1: Check Compilation Status
- Access your Adobe Commerce account.
- Click System.
- Click Tools.
- Click Compilation.
- If compilation is disabled, continue to Step 2.
- If compilation is enabled, you’ll need to disable it:
- Access your Adobe Commerce admin.
- Click System.
- Click Tools.
- Click Compilation.
- Click Disable.
You’ll be able to re-enable it again once you’ve finished the installation process.
Step 2: Install the Yotpo Products Reviews Extension
- Search for Yotpo Reviews in the Adobe Marketplace or click here.
- Add the Yotpo Reviews to your cart by clicking Add to Cart and proceed to checkout.
The Yotpo Reviews Adobe Commerce extension is free of charge and there is no payment information required. - Find your Adobe Commerce Access Keys here.
- Select Adobe Commerce 1, find Yotpo Reviews, and copy the access key.
- Return to your Adobe Commerce admin.
- Click System.
- Click Adobe Commerce Connect.
- Click Adobe Commerce Connect Manager.
- Paste the access key you copied in previous steps in the input field under Install New Extensions.
- Click Install, and then click Proceed.
The following message should appear: - Log out of Adobe Commerce.12. Log back into Adobe Commerce.
Step 3: Install the Yotpo Reviews Widget
- Return to your Adobe Commerce admin.
- Click System.
- Click Configuration.
- Select your store view name from the Configuration Scope drop-down menu.
- On the left sidebar, click Yotpo.
- On the left sidebar, click the Yotpo Product Reviews Software tab.
If you encounter a "404 page not found" error, log out of Adobe Commerce and log back in. - Under Yotpo Widget Configurations, enter your Yotpo App Key and Yotpo Secret Key.
For instructions on how to find your App Key and your Secret Key, click here. - Click Save Config.
Yotpo JavaScript, Conversion Tracking, Reviews Widget, and Star Rating on Product Pages are now automatically installed.
Step 4: Disable the Built-In Reviews System
- Return to your Adobe Commerce admin.
- Click System.
- Click Configuration.
- On the left sidebar, click Advanced. You may need to scroll down to see this.
- If necessary, click Disable Modules output, to open the panel.
- Set Mage Review to disable.
- Click Save Config.
Step 5: Re-enable Compilation (optional)
This step is only relevant if Compilation was enabled before you installed Yotpo. If Compilation was disabled, skip to Step 6.
- Return to your Adobe Commerce admin.
- Click System.
- Click Tools.
- Click Compilation.
- Click Enable.
- Click Run Compilation Process.
Step 6: Import your reviews
- Return to your Adobe Commerce Admin
- Click Catalog.
- Select Reviews and Ratings.
- Select Customer Reviews.
- Click Select All.
- In the Actions menu, select Export Reviews.
- Click Submit.
- The file is downloaded to your local hard drive. You can edit the CSV file before submitting it.
- Use the online support form to submit the files and Yotpo will import the reviews for you.
Manually installing Yotpo Review Widget
By default, the widget is installed beneath the product description on the product page. First of all, you need to disable to default position:
- In the admin panel, go to System > Configuration
- Click on the Yotpo Social Reviews tab on the left
- Change the Disable Default Widget Position to 'Yes'
- Click Save
Next, you’ll have to edit the file view.phtml:
Add the following code where you want the widget to appear:
<?php echo $this->helper('yotpo')->showWidget($this, $_product); ?>
Manually installing Yotpo Star Rating
The Yotpo Star Rating presents an aggregated star rating of your products on your product pages.
To add the widget to your product page, paste the following code to the view.phtml file where you want the star rating to appear:
<?php echo $this->helper('yotpo')->showBottomline($this, $_product); ?>
We recommend adding the code below the next div structure:
<div class="product-name">...</div>
Exporting your existing reviews
- Install the Yotpo plugin.
- Log into your Adobe Commerce Admin.
- Click on Catalog.
- Select Reviews and Ratings.
- Select Customer Reviews.
- Click Select All.
- Select Export Reviews in the Actions menu.
- Click Submit. The file will be downloaded to your local hard drive.
- Use the online support form to submit the files and Yotpo will import the reviews for you.
Pulling your past orders
Yotpo will send out automatic review request emails to your past customers immediately after you activate the feature. If you don't want Automatic Review Requests to be sent out to your past customers, only to future ones, please contact our support team. To generate past orders:
- Log into your Adobe Commerce Admin panel.
- Click System.
- Click Configuration.
- Click Yotpo Product Reviews Software in the left-hand tab.
- Under Yotpo Widget Configuration, click Generate Reviews for My Past Orders.
Exporting your store catalog
The Product Catalog Export Plugin allows you to quickly and easily export your store's catalog in Yotpo's product catalog format.
Once you have the product catalog file, you can use it to update products in your current shop or import products if you are switching to a new shop/platform.
The plugin supports Adobe Commerce multi-store and product attribute codes for unique identifiers (UPC, ISBN, MPN, and Brand).
Installing the plugin
- Click here to download the installation file.
- Click the download icon at the top right corner.
- Open your Adobe Commerce store admin.
- Click on System > Magento Connect > Magento Connect Manager.
- Go to the Direct package file upload section.
- Click on Choose file and choose the installation file you just downloaded.
- Click on Upload.
- Once the installation is complete, log out from the Adobe Commerce Admin and log in once again in order to refresh the admin's cache.
Accessing the plugin
To access the plugin go to System > Configuration and look for Export Product Catalog.
Exporting your product catalog
- If you wish to include unique identifiers in your exported catalog, please fill the relevant attribute code field:
- Click the Save Config button to save the information you added to the export.
- Click the Download Product Catalog button to complete the process.
Where to find the correct attribute code
To find your attribute codes, Click on Catalog > Manage Attributes in your Adobe Commerce Admin Panel:You will then see a list of all your attribute codes. Locate the relevant code and paste it in the corresponding field in the catalog export plugin
Collecting reviews for grouped products
This section describes Yotpo support for configurable and grouped products.
Configurable products
By default reviews for a simple product are automatically shown on the parent page. For example - if the parent product is a Vans Atwood running shoe and the simple product is that same model of shoe in red then the review will be on the Vans Atwood main page.
Grouped products
By default, reviews for grouped products are shown on the simple product pages.To show reviews on the grouped product pages, edit the APIClient.php field.
Editing the APIClient.php file
- Navigate to /app/code/community/Yotpo/Yotpo/Helper/
- Open the file APIClient.php in a text editor.
- Replace the following code:
$configurable_product_model = Mage::getModel('catalog/product_type_configurable');
$parentIds = $configurable_product_model->getParentIdsByChild($full_product->getId());
if (count($parentIds) > 0) {
$full_product = Mage::getModel('catalog/product')->load($parentIds[0]);
}
with:
//configurable
$configurable_product_model = Mage::getModel('catalog/product_type_configurable');
$configurable_parentIds= $configurable_product_model->getParentIdsByChild($full_product->getId());
//grouped
$grouped_product_model = Mage::getModel('catalog/product_type_grouped');
$grouped_parentIds= $grouped_product_model->getParentIdsByChild($full_product->getId());
if (count($configurable_parentIds) > 0) {
$full_product = Mage::getModel('catalog/product')->load($configurable_parentIds[0]);
} else if (count($grouped_parentIds) > 0) {
$full_product = Mage::getModel('catalog/product')->load($grouped_parentIds[0]);
}
- Save the file
Troubleshooting
Export reviews tool is missing
If you are trying to export your past reviews from Adobe Commerce 1.X and you cannot find that option on your Adobe Commerce admin page, follow the instructions for the scenario that applies to you.
If using the Amasty extension: The Amasty extension overrides the default Adobe Commerce behavior and prevents Yotpo export from showing.
Solution
- Locate this file: app/code/community/Yotpo/Yotpo/Model/Export/Observer.php
- Replace the if condition in line 7 with the one below:
if ((get_class($block) == 'Mage_Adminhtml_Block_Widget_Grid_Massaction' || get_class($block) == 'Amasty_Oaction_Block_Adminhtml_Widget_Grid_Massaction')
For other cases:You can use the Generate Past Orders feature in your Adobe Commerce Admin to generate a CSV with reviews instead.
Solution
- Locate this file: app/code/community/Yotpo/Yotpo/Model/Export/Csv.php
- Replace each loop in lines 26-34 with the following:
foreach ($allReviews as $fullReview) {
$io->streamWriteCsv($this->writeReview($storeId, $fullReview));
}
- Locate this file: app/code/community/Yotpo/Yotpo/controllers/Adminhtml/YotpoController.php
- Replace the massMailAfterPurchaseAction function in lines 11-112 with the following:
public function massMailAfterPurchaseAction() {
$reviews = array('reviews');
$file = Mage::getModel('Yotpo_Yotpo_Model_Export_Csv')->exportReviews($reviews);
$this->_prepareDownloadResponse($file, file_get_contents(Mage::getBaseDir('export').'/'.$file));
var_dump(Mage::getBaseDir('export').'/'.$file);
Mage::app()->getResponse()->setBody(1);
}
- Click on the Generate reviews for my past ordersbutton:
- The export file is now ready for your use on this directory: var/export/
- Revert the files you modified in Adobe Commerce to their original version
Installing Yotpo in a Tab With EasyTabs
- Log into Adobe Commerce and go to 'Template Masters -> Easy Tabs'.
- Click '( + ) Add New'.
- From the 'Block Type' drop-down select 'Custom Block'. Fill out the rest of the information.
- Title: Whatever title you wish to appear
- Alias: Doesn't matter, but better make it distinct, "YotpoReviews" is a good name.
- Block: yotpo/yotpo
- Template: yotpo/reviews.phtml
- Sort Order: defines the order in which the tabs will appear if you have other tabs installed.
- Status: set to 'Enable'
- Click Save
- Connect to your server via FTP (or any alternative method) and edit
app/design/frontend/base/default/template/yotpo/reviews.phtml- Add right before the closing: </div>
Here's a screenshot illustrating all the steps:
Sending automatic review requests based on order status
Send automatic review request emails based on completion date or a custom order status rather than the shipment or purchase date. If the order contains multiple purchases, the review request is sent according to the completion date of the first purchase.
An order's Shipment Date can be found in the Order View, under Shipment.
Adobe Commerce configuration
- Log in to your Adobe Commerce admin.
- Select Configuration in the System menu.
- Click the Yotpo Social Reviews Software tab in the sidebar on the left.
- Change the order status from Complete to Shipped.
- Click Save.
Editing the Yotpo files
The files you need to edit are in the Yotpo plug-in directory under your Adobe Commerce directory.
Edit YotpoController.php
- Open app\code\community\Yotpo\Yotpo\controllers\Adminhtml\YotpoController.php in a text editor.
- Search for the following text: $order_data['order_id'] = $order->getIncrementId();
- Replace this code:
$order_data['order_id'] = $order->getIncrementId();
$order_data["email"] = $order->getCustomerEmail();
$order_data["customer_name"] = $order->getCustomerName();
$order_data["order_date"] = $order->getCreatedAtDate()->toString('yyyy-MM-dd HH:mm:ss');
$order_data['currency_iso'] = $order->getOrderCurrency()->getCode();
$order_data['products'] = Mage::helper('yotpo/apiClient')->prepareProductsData($order);
$orders[] = $order_data;
- with this code
$order_data['order_id'] = $order->getIncrementId();
$order_data["email"] = $order->getCustomerEmail();
$order_data["customer_name"] = $order->getCustomerName();
if ( !($order->getShipmentsCollection())){
$order_data["order_date"] = $order->getCreatedAtDate()->toString('yyyy-MM-dd HH:mm:ss'); //if no shipment, user purchase date
} else {
foreach ($order->getShipmentsCollection() as $shipments)
{
$shipment = $shipments->getCreatedAt();
}
$order_data["order_date"] = $shipment; //if has shipment, use shipment date
}
//$order_data["order_date"] = $order->getCreatedAtDate()->toString('yyyy-MM-dd HH:mm:ss');
$order_data['currency_iso'] = $order->getOrderCurrency()->getCode();
$order_data['products'] = Mage::helper('yotpo/apiClient')->prepareProductsData($order);
$orders[] = $order_data;
Edit Observer.php
- Open app\code\community\Yotpo\Yotpo\Model\Mail\Observer.php in a text editor.
- Search for the following text: if (!in_array($order->getStatus(), $orderStatuses)) {
- Replace this code:
if (!in_array($order->getStatus(), $orderStatuses))
{
return $this;
}
$data = array();
if (!$order->getCustomerIsGuest()) {
$data["user_reference"] = $order->getCustomerId();
}
$data["email"] = $order->getCustomerEmail();
$data["customer_name"] = $order->getCustomerName();
$data["order_id"] = $order->getIncrementId();
$data["order_date"] = $order->getCreatedAtDate()->toString('yyyy-MM-dd HH:mm:ss');
$data['platform'] = 'magento';
$data['currency_iso'] = $order->getOrderCurrency()->getCode();
$data['products'] = Mage::helper('yotpo/apiClient')->prepareProductsData($order);
- with this code
if (!in_array($order->getStatus(), $orderStatuses) || !($order->getShipmentsCollection()) ) //exit if status is invalid, or if no shipment exists
{
return $this;
}
$data = array();
if (!$order->getCustomerIsGuest()) {
$data["user_reference"] = $order->getCustomerId();
}
$data["email"] = $order->getCustomerEmail();
$data["customer_name"] = $order->getCustomerName();
$data["order_id"] = $order->getIncrementId();
foreach ($order->getShipmentsCollection() as $shipments)
{
$shipment = $shipments->getCreatedAt(); //get shipment date
}
$data["order_date"] = $shipment; //set shipment date
//$data["order_date"] = $order->getCreatedAtDate()->toString('yyyy-MM-dd HH:mm:ss');
$data['platform'] = 'magento';
$data['currency_iso'] = $order->getOrderCurrency()->getCode();
$data['products'] = Mage::helper('yotpo/apiClient')->prepareProductsData($order);
Testing and confirmation
To test that the automatic review request is sent based on shipping date:
- Make a test purchase after you have completed the configuration
- Set it the order status to Shipped
- Make sure that a shipment has been created
Contact Yotpo Support for assistance on completing the test procedure
Troubleshooting
If automatic review requests are not being sent:
- Make sure that the order has been shipped and that Adobe Commerce has created a shipment for it. The above solution only works if an order shipment entry has been created in Adobe Commerce.
- Make sure that order status matches the status specified in the Yotpo config panel in Adobe Commerce.
Pulling larger thumbnail images
Yotpo's API pulls the lower-resolution thumbnail images by default from the Adobe Commerce backend to use in MAPs, on-site elements, and social media messaging. If you wish to pull larger images, please use these instructions.
- Please locate 'Yotpo.php' file (the file may be found under '.../app/code/community/Yotpo/Yotpo/Block').
- Locate 'getSmallImage()' function;
$image_url = Mage::getModel('catalog/product_media_config')->getMediaUrl($this->getProduct()->getSmallImage());
- Replace 'getSmallImage()' with 'getImage()' so that the final code looks like that:
$image_url = Mage::getModel('catalog/product_media_config')->getMediaUrl($this->getProduct()->getImage());