Setup Widget 2.0

To setup Widget 2.0, here are the codes to replace.

Note: Requires the Enterprise plan

Install Script and CSS before the </body> tag:

<script async type="text/javascript" data-api-key="" id="stamped-script-widget" src="https://cdn-stamped-io.azureedge.net/files/widget.min.js"></script>

To replace the reviews widget in product page (usually in product.liquid)

Find:

<div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div>

Replace with:

<div id="stamped-main-widget"
data-product-id="{{ product.id }}"
data-name="{{ product.title | escape }}"
data-url="{{ shop.url }}{{ product.url }}"
data-image-url="{{ product.featured_image | product_img_url: "large" |replace: '?', '%3F' | replace: '&','%26'}}"
data-description="{{ product.description | escape }}"
data-product-sku="{{product.handle}}">
{{ product.metafields.stamped.reviews }}
</div>

To replace the badge with Widget 2.0 badge:

Find: 

<span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>

Replace with:

<span class="stamped-product-reviews-badge stamped-main-badge" data-id="{{ product.id }}" style="display: inline-block;">{{ product.metafields.stamped.badge }}</span> 

To replace badge in collection pages (usually in product-grid-item.liquid):

Find: 

<span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>

Replace with:

<span class=" stamped-product-reviews-badge" data-id="{{ product.id }}" style="display:block;">{{ product.metafields.stamped.badge }}</span>

Still need help? Contact Us Contact Us