Embedded Widget Yotpo bigcommerce -
can me why embedded widget don't appear on yotpo app? im using bigcommerce platform. try uninstalling , installing on , on results still same.
disable built in reviews. deselect product reviews checkbox save.
to install yotpo social reviews widget:
log in bigcommerce admin page.
- click settings.
- click design in store setup column.
- click edit html/css.
- click productdetails.html under other template files-panels.
add following code after last line of file.
<script type="text/javascript"> //<![cdata[ var div = document.createelement("div"); div.setattribute('class', 'yotpo yotpo-main-widget'); div.setattribute('data-product-id', "%%global_productid%%"); div.setattribute('data-name', "%%global_productname%%"); div.setattribute('data-url', document.url); div.setattribute('data-description', ""); div.setattribute('data-image-url', "%%global_thumbimageurl%%"); if ($(".yotpo.placeholder").length) { $(".yotpo.placeholder").append(div); } else { $("#productdescription").append(div); } //]]> </script>
add yotpo javascript code below directly htmlhead.html.
- go design > edit html/css , find htmlhead.html.
add following code after last line of file, above
</head>
.<script type="text/javascript"> (function e() { var e = document.createelement("script"); e.type = "text/javascript", e.async = true, e.src = "//staticw2.yotpo.com/your-app_key/widget.js"; var t = document.getelementsbytagname("script")[0]; t.parentnode.insertbefore(e, t) })(); </script>
don't forget replace your-app_key key.