fbpx Skip to content

Shop

#stamped-reviews-widget[data-widget-type=”carousel”] {
position: relative;
overflow: hidden;
clear: both;
max-width: 1200px;
margin: auto;
}

#stamped-reviews-widget[data-widget-type=”carousel”] a {
text-decoration: none;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-reviews-date {
float: right;
padding-top: 3px;
color: #AAA;
margin-right: 20px;
font-size: 11px;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-title {
font-size: 20px;
font-weight: bold;
margin-bottom: 10px;
float: left;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-title:empty:before {
content: “Real Reviews from Real Customers”
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-subtitle span.stamped-carousel-subtitle-count:after {
content: ” Reviews”
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-subtitle .fa-star:before {
font-size: 17px;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-subtitle {
float: right;
margin-right: 10px;
margin-top: 5px;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-buttons {
float: right;
width: 70px;
line-height: 30px;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-buttons div {
height: 30px;
width: 30px;
display: inline-block;
cursor: pointer;
font-size: 30px;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll {
float: left;
width: 100%;
height: 250px;
overflow: auto;
white-space: nowrap;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll:before {
border-bottom: 2px solid #eee;
display: block;
content: ”;
margin-top: 0px;
margin-bottom: 15px;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .block {
color: #777;
display: inline-block;
height: 250px;
padding-bottom: 20px;
padding-right: 0px;
vertical-align: top;
font-size: 15px;
text-align: left;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-rating {
font-size: 25px;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-message {
padding-right: 10px;
margin-left: 100px;
white-space: pre-line;
line-height: 20px;
font-weight: normal;
text-transform: initial;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-message-block {
font-style: italic;
font-size: 14px;
font-family: Open Sans;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 14px;
line-height: 17px;
color: #a2a2a2;
border: none;
padding: 0;
margin: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-image {
height: 80px;
width: 80px;
float: left;
margin-right: 10px;
display: inline-block;
vertical-align: top;
text-align: center;
position: relative;
border: 1px solid #ddd;
padding: 3px;
border-radius: 5px;
background: white;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-image a {
color: #AAA;
display: block;
height: 75px;
white-space: pre-line;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-image img {
max-height: 100%;
max-width: 100%;
width: auto;
height: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
position: absolute;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-title {
font-size: 1.2em;
overflow: hidden;
font-weight: bold;
margin: 5px 0;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 21px
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-product-title {
color: #AAA;
font-size: 10px;
white-space: initial;
text-align: left;
clear: both;
line-height: 11px;
margin: 5px -3px;
margin-top: 12px;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-author {
font-weight: bold;
font-size: 13px;
margin-top: 5px;
margin-left: 100px;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll-wrapper {
width: 100%;
position: absolute;
left: 0;
font-size: 0px;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-ratings-wrapper {
padding: 0 20px 0 0;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-button-left:before {
content: “”
}

#stamped-reviews-widget[data-widget-type=”carousel”][data-show-avatar=”false”] .stamped-reviews-image {
display: none;
}

#stamped-reviews-widget[data-widget-type=”carousel”][data-show-avatar=”false”] .stamped-carousel-scroll .stamped-reviews-message,
#stamped-reviews-widget[data-widget-type=”carousel”][data-show-avatar=”false”] .stamped-carousel-scroll .stamped-reviews-author {
margin-left: 0px !important;
}

@media screen and (max-width: 690px) {
#stamped-reviews-widget[data-widget-type=”carousel”] {
width: 80%;
margin: auto !important;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .block {
width: 100% !important;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-message {
margin-left: 100px !important;
line-height: 16px !important;
font-size: 14px;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .stamped-carousel-scroll .stamped-reviews-author {
margin-left: 100px !important;
}

#stamped-reviews-widget[data-widget-type=”carousel”][data-show-avatar=”false”] .stamped-carousel-scroll .stamped-reviews-message,
#stamped-reviews-widget[data-widget-type=”carousel”][data-show-avatar=”false”] .stamped-carousel-scroll .stamped-reviews-author {
margin-left: 0px !important;
}
}

.fa-star, .fa-star-o, .fa-star-half-o, .stamped-fa-star, .stamped-fa-star-o, .stamped-fa-star-half-o {
color: gold;
}

#stamped-reviews-widget[data-widget-type=”carousel”] .fa-star-half-o:before, #stamped-reviews-widget[data-widget-type=”carousel”] .fa-star-o:before, #stamped-reviews-widget[data-widget-type=”carousel”] .fa-star:before {
font-size: 25px;
margin-right: 1px;
}

var StampedCarouselFn = (function (window, document) {
var perSlide, autoPlay, autoPlaySpeed, autoPlayInterval, link;
var $;
var arrData = [];
var isMobile = /iPhone|iPod|Android/i.test(navigator.userAgent);

function init(data, obj, jQuery) {
$ = jQuery;
perSlide = obj.data(‘per-slide’);
autoPlay = obj.data(‘auto-play’) == true ? true : false;
autoPlaySpeed = obj.data(‘auto-play-speed’) || 10000;
autoPlaySpeed = autoPlaySpeed < 1000 ? autoPlaySpeed * 1000 : autoPlaySpeed;
var storeUrl = obj.attr('data-store-url');
var showAvatar = obj.attr('data-show-avatar');
var isHighRes = obj.data('hi-res') || obj.data('resolution') == 'high';
var isTotalWidget = obj.data('is-widget-total') == true ? true : false;
var isRandom = obj.data('random');
var isForceRichSnippet = obj.attr('data-rich-snippet-force') == 'true' ? true : false;
obj.attr('data-rating-all', data.ratingAll);

var take = obj.data('take');

var classNameWidget = '#stamped-reviews-widget[data-widget-type="carousel"]';
var styleColorTitle = obj.data('style-color-title');
var styleColorText = obj.data('style-color-text');
var styleColorLink = obj.data('style-color-link');
var styleColorStar = obj.data('style-color-star');

var isLazyLoad = false;
if (window.LazyLoadStamped && LazyLoadStamped.update && window.LazyLoadStampedDisabled != true) {
isLazyLoad = true;
}

var style = '';

if (styleColorTitle) {
style += classNameWidget + ' ' + '.stamped-style-color-title { color:' + styleColorTitle + ' !important; }';
}
if (styleColorText) {
style += classNameWidget + ' ' + '.stamped-style-color-text { color:' + styleColorText + ' !important; }';
}
if (styleColorLink) {
style += classNameWidget + ' ' + '.stamped-style-color-link { color:' + styleColorLink + ' !important; }';
}
if (styleColorStar) {
style += classNameWidget + ' ' + '.stamped-style-color-star i { color:' + styleColorStar + ' !important; }';
}

if (style) {
$(obj).append('’ + style + ”);
}

link = obj.data(‘link’);
perSlide = !perSlide ? 3 : perSlide;
arrData = data.data;

if (isRandom) {
arrData = shuffleArray(arrData);
}

if (arrData.length 0 && !is_root) {
// create richsnippet
var richSnippet = {
“@context”: “http://schema.org”,
“@type”: “Product”,
“aggregateRating”: {
“@type”: “AggregateRating”,
“bestRating”: “5”,
“worstRating”: “1”,
“reviewCount”: totalReviews,
“ratingValue”: data.rating,
“itemReviewed”: data.shop
},
“name”: data.shop
};

var script = document.createElement(‘script’);
script.type = ‘application/ld+json’;
script.innerHTML = JSON.stringify(richSnippet);
document.getElementsByTagName(‘head’)[0].appendChild(script);
}

}

var perWidth = Math.floor(100 / perSlide);

var stringBlocks = ”;
var totalTake = take || 30;

var totalLength = arrData.length >= totalTake ? totalTake : arrData.length;
var currentSlide = 0;
var currentWidth = 100;

// carousel title
var title = $(obj).attr(‘data-title’);

if (!!title) {
$(‘.stamped-carousel-title’, obj).html(title);
}

var starHtml = “”;
var ratingRemain = 5;

while (totalRating >= 0.01 || ratingRemain > 0) {
if (totalRating >= 0.5 && totalRating < 1) {
starHtml += '‘;
} else if (totalRating >= 1) {
starHtml += ‘‘;
} else {
starHtml += ‘‘;
}

totalRating–;
ratingRemain–;
}

$(‘.stamped-carousel-stars-wrapper’, obj).html(”);
$(‘.stamped-carousel-stars-wrapper’, obj).html(starHtml);

for (var i = 0; i < totalLength; i++) {

currentSlide++;
if (currentSlide == (perSlide)) {
perWidth = currentWidth;
currentWidth = 100;
currentSlide = 0;
} else {
perWidth = Math.floor(100 / perSlide);
currentWidth = currentWidth – perWidth;
}

var blockHtml = '

{7}
{0}
{5}

{6}
{9}

‘;
var starHtml = “”;
var rating = parseInt(arrData[i].reviewRating);
while (rating > 0) {
starHtml += ‘‘;
rating–;
}

var balance = (5 – parseInt(arrData[i].reviewRating));
while (balance > 0) {
starHtml += ‘‘;
balance–;
}

if (storeUrl) {
arrData[i].productUrl = arrData[i].productUrl + “?storeUrl=” + storeUrl;
}

if (arrData[i].productImageUrl) {
if (isHighRes == true) {
arrData[i].productImageUrl = arrData[i].productImageLargeUrl;
}

arrData[i].productImageUrl = arrData[i].productImageUrl.replace(‘%3F’, ‘?’);
}

stringBlocks += blockHtml.format(starHtml, arrData[i].reviewTitle, arrData[i].productUrl, arrData[i].productImageUrl, arrData[i].productName, arrData[i].reviewMessage, arrData[i].author, arrData[i].reviewDate, arrData[i].reviewVerifiedType, arrData[i].location);
}

$(‘.stamped-carousel-scroll-wrapper’, obj).html(stringBlocks);

$(‘.stamped-carousel-subtitle span.stamped-carousel-subtitle-count’, obj).html(totalReviews);

if (link) {

var _html = $(‘.stamped-carousel-subtitle’, obj).html();
var _newLink = ‘‘ + _html + ‘‘;

$(‘.stamped-carousel-subtitle’, obj).html(_newLink);
}

// set height
if (isMobile || perSlide == 1) {
// set height
var getHeight = $(‘.block’, obj).eq(0).height();

// set height
$(‘.stamped-carousel-scroll’, obj).attr(‘style’, ‘height: ‘ + (getHeight + 50) + ‘px’);
} else {
var maxHeight = Math.max.apply(null, $(‘.block’, obj).slice(0, 2).map(function () {
return $(this).height();
}).get());

// set height
$(‘.stamped-carousel-scroll’, obj).attr(‘style’, ‘height: ‘ + (maxHeight + 70) + ‘px’);
}

$(document).trigger(‘stamped:widget:carousel:loaded’);

if (autoPlay == true) {
autoPlayInterval = setInterval(function () {
StampedCarouselFn.switchSlide(obj, 1);
}, autoPlaySpeed);
}

var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;

$(obj)[0].addEventListener(‘touchstart’, handleTouchStart2, false);
$(obj)[0].addEventListener(‘touchmove’, handleTouchMove2, false);

var xDown = null;
var yDown = null;

function handleTouchStart2(evt) {
var target = $(evt.target);
if (!target.closest(‘#stamped-reviews-widget[data-widget-type=”carousel”]’).length) {
return;
}
xDown = evt.touches[0].clientX;
yDown = evt.touches[0].clientY;
};

function handleTouchMove2(evt) {
if (!xDown || !yDown) {
return;
}

var xUp = evt.touches[0].clientX;
var yUp = evt.touches[0].clientY;

var xDiff = xDown – xUp;
var yDiff = yDown – yUp;

if (Math.abs(xDiff) > Math.abs(yDiff)) {/*most significant*/
if (xDiff > 0) {
/* left swipe */
StampedCarouselFn.switchSlide(evt.target, 1, true);
} else {
/* right swipe */
StampedCarouselFn.switchSlide(evt.target, -1, true);
}
} else {
if (yDiff > 0) {
/* up swipe */
} else {
/* down swipe */
}
}
/* reset values */
xDown = null;
yDown = null;
};

if (isLazyLoad) {
LazyLoadStamped.update();
}
}

function switchSlide(obj, pad, stopInterval) {
if (stopInterval == true) {
clearInterval(autoPlayInterval);
}

var stampedCarousel_currentPage = 1;
var widget = $(obj).closest(‘#stamped-reviews-widget’);
var carousel = widget.find(‘#stamped-carousel-scroll-wrapper’);

perSlide = $(widget).data(‘per-slide’) || 3;

if ($(widget).attr(‘data-page’)) {
stampedCarousel_currentPage = parseInt($(widget).attr(‘data-page’));
} else { }
var totalBlocks = $(‘div[class=\”block\”]’, carousel).length;
var stampedCarousel_totalPage = totalBlocks > 0 ? Math.ceil(totalBlocks / perSlide) : 0;

if (isMobile) {
stampedCarousel_totalPage = totalBlocks;
}
if (stampedCarousel_currentPage == stampedCarousel_totalPage && pad == 1) {
return;
}
stampedCarousel_currentPage += pad;
if (stampedCarousel_currentPage == 0) {
stampedCarousel_currentPage = 1;
}
$(widget).attr(‘data-page’, stampedCarousel_currentPage);
var width = carousel[0].offsetWidth * (stampedCarousel_currentPage – 1);
carousel.attr(‘style’, ‘left: -‘ + width + ‘px’);

if (isMobile || perSlide == 1) {
// set height
var getHeight = $(‘.block’, widget).eq(stampedCarousel_currentPage – 1).height();

// set height
$(‘.stamped-carousel-scroll’, widget).attr(‘style’, ‘height: ‘ + (getHeight + 50) + ‘px’);
} else {
var cIdx = (stampedCarousel_currentPage – 1) * perSlide;
var nIdx = (stampedCarousel_currentPage) * perSlide;

var maxHeight = Math.max.apply(null, $(‘.block’, widget).slice(cIdx, nIdx).map(function () {
return $(this).height();
}).get());

// set height
$(‘.stamped-carousel-scroll’, widget).attr(‘style’, ‘height: ‘ + (maxHeight + 70) + ‘px’);
}
}

String.prototype.format = function () {
var formatted = this;
for (var i = 0; i 0; i–) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}

return array;
}

return {
init: init,
switchSlide: switchSlide
}
}(window, document));