Welcome and thank you for starting your journey with us at Stamped! Stamped is the reviews and loyalty platform for eCommerce, helping you establish brand credibility by building trust and giving your customers a voice.
In this guide
For Magento 1.x
- Install Stamped Plugin
- Import Existing Reviews into Stamped
- Import History Orders into Stamped
- Basic Setup
- Widget Settings & Installation
- Category Pages
- Supported Codes
Magento 2.x Setup
For Magento 1.x
Install Stamped Plugin
- You can download our plugin here:
Magento Marketplace:
https://marketplace.magento.com/shopry-stamped-reviews.html
Github:
https://github.com/Stamped-io/Magento-v1.x
- Activate the Plugin
- Go to System => Configuration => Stamped => Settings and fill out the following
- You can get the API keys by signing up for a free account at https://stamped.io/
- Update your display settings to determine where you want your reviews displayed on your product pages.
Import Existing Reviews into Stamped
- With our Reviews Importer, you can easily import/migrate all your current reviews into Stamped.
- For more details please visit our Migration Guide
Import Historical Orders into Stamped
With our History Orders Import, you can easily import all your existing orders history up to 6 months to Stamped.
- Go to System => Configuration => Stamped => Settings
- Click on the Import Historical Orders button
*Please make sure that the information on the settings section above is filled in correctly before importing all your existing orders history.
Basic setup
- Let’s get you started with some basic setup. Go to settings and you will see this page for general settings:
- Firstly, paste your store's logo image URL in the box shown, which will be reflected in your review email template. You can upload an image of your store logo in Shopify admin.
- Fill up the rest of the details as required.
- Next, go to customize from the settings menu on the left:
- This is where you can modify our basic review email template in ways to fit it to your store's branding. Feel free to explore the various options available!
- Everything is set and good to go! You should see review emails generated in the queue for subsequent orders received.
Widget Settings & Installation
- You can do some basic setup and configuration of the main review widget under main widget:
- Take a look at our full list of display widgets available under settings -> display widgets:
- Our widgets allow you to easily customize the appearance of your user generated content on your website. For example in a tab on the side of the page or a carousel of your best reviews in your site's cart page to encourage a checkout.
- With a little bit of code (or a little bit of help from your developers), it's easy to display your reviews in various parts of your store using widgets. Each widget has a custom snippet that you place into where you would like it to be displayed on your website.
Category Pages
To add star ratings in category pages you’ll need to edit the list.phtml file.
There are 2 types of views in Magento, you'll need to add the star ratings codes on both views:
1) List Mode <?php // List mode ?>
Find the following codes:
<?php $i=0; foreach ($_productCollection as $_product): ?> … <?php endforeach; ?>
Insert the following code inside this structure:
<?php $this->helper('stamped')->showBadge($this, $_product); ?>
2) Grid Mode <?php // Grid mode ?>
Find the following codes:
<?php $i=0; foreach ($_productCollection as $_product): ?>
Insert the following code inside this structure:
<?php $this->helper('stamped')->showStampedBadge($this, $_product); ?>
Supported Codes
To display the badge in category pages:
<?php $this->helper('stamped')->showStampedBadge($this, $_product); ?>
To display the reviews widget (programatically):
<?php $this->helper('stamped')->showStampedWidget($this, $_product); ?>
To display reviews widget in a different position, add the following <div> element in the location you'll want the widget to appear:
<div id="stamped-main-widget-placeholder"></div>
To add rich snippets support for HTML based structured data
<?php $array = $this->helper('stamped')->getRichSnippetData($this); ?> <?php if (!empty($array["reviews_count"]) && $array["reviews_count"] != 0): ?> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <span itemprop="name"><?php echo $_product->getName();?></span> <span itemprop="ratingValue"><?php echo $array["average_score"]; ?></span> <span itemprop="ratingCount"><?php echo $array["reviews_count"]; ?></span> </div> <?php endif; ?>
To add rich snippets support for JSON-LD based structured data
<?php $array = $this->helper('stamped')->getRichSnippetData($this); ?> <?php if (!empty($array["reviews_count"]) && $array["reviews_count"] != 0): ?> "aggregateRating": { "@type": "AggregateRating", "ratingValue": "<?php echo $array["average_score"]; ?>", "bestRating": "5", "worstRating": "1", "reviewCount": "<?php echo $array["reviews_count"]; ?>" }, <?php endif; ?>
Magento 2.x Setup
Install Stamped Plugin
1. Link to Magento Plugin Install, download the plugin here:
Github:
https://github.com/Stamped-io/Magento-v2.x
2. You need to unzip it and place it in app/code folder then use terminal to go to Magento root and give 777 permission to var, pub folder then run setup upgrade command :php bin/magento setup:upgrade
then again give 777 permission to var, pub folder
Insert Star Rating Badge in Category Pages
To add star ratings on Category page, add the following code to this file: /vendor/magento/module-catalog/view/frontend/templates/product/list.phtml
<span class="stamped-product-reviews-badge" data-id="<?php echo $_product->getId() ?>" style="display: block;"></span>
Install Product Rich Snippets
To include product rich snippet in the Magento 2 platform, your store needs to have a set of product schema codes present in the site, which can be custom-developed or rendered by an SEO app that provides the codes, as Magento 2 does not support any structured data by default. Once the product schema is present, please install the following set of codes:
<script> function addEventListenerStamped(el, eventName, handler) { if (el.addEventListener) { el.addEventListener(eventName, handler); } else { el.attachEvent('on' + eventName, function () { handler.call(el); }); } } addEventListenerStamped(document, 'stamped:reviews:loaded', function(e) { var ratingCount = jQueryStamped('meta[itemprop="reviewCount"]').attr('content'); var ratingValue = jQueryStamped('meta[itemprop="ratingValue"]').attr('content'); var richSnippet = { "@context": "http://schema.org", "@type": "Product", "@id": "HTTPS://STORE.COM/URL/#product" } if (parseInt(ratingValue) > 0){ richSnippet.aggregateRating = { "@type": "AggregateRating", "ratingValue": ratingValue, "reviewCount": ratingCount } } var script = document.createElement('script'); script.type = 'application/ld+json'; script.innerHTML = JSON.stringify(richSnippet); document.getElementsByTagName('head')[0].appendChild(script); }); </script>
You will then need to include the same "@id" field in the product schema code present within the theme file, to link the two sets of codes together:
"@id": "HTTPS://STORE.COM/URL/#product"
You can make use of Google's tool, such as GSDT to confirm the placement of the codes is correct. You should see the aggregateRating field rendering within the product schema, on product pages which contains reviews: