<!-- ************************************** --> <!-- ********* START PD TAGGING *********** --> <!-- ************************************** --> <div id="pdPageTag" style="display:none" productId="{{product.id}}" productCode="{{product.sku}}" categoryId="{{category.id}}"></div> <!-- *************************************** --> <!-- ********* FINISH PD TAGGING *********** --> <!-- *************************************** -->
<!-- ************************************************* --> <!-- ********* START PD INTEGRATION SCRIPT *********** --> <!-- ************************************************* --> <script type="text/javascript"> function pdInit() { var elements = new Array(); try {elements = document.getElementsByClassName("pdRatingStarCategory");} catch(e){} var productIdList = new Array(); for(var i=0;i<elements.length;i++) { productIdList[i] = elements[i].getAttribute("productid"); } var productIdListCsv = productIdList.join(","); var cb = (new Date()).getTime(); var scriptUrl = https://XXXXXXXXXXXXXX.practicaldatacore.com/mod_bigcommerce/services/pageScript.php ; scriptUrl += ?cb= + cb; scriptUrl += &customerId= + encodeURIComponent("{{ customer.id }}"); scriptUrl += &email= + encodeURIComponent("{{ customer.email }}"); scriptUrl += &productId= + encodeURIComponent(document.getElementById("pdPageTag").getAttribute("productId")); scriptUrl += &productCode= + encodeURIComponent(document.getElementById("pdPageTag").getAttribute("productCode")); scriptUrl += &categoryId= + encodeURIComponent(document.getElementById("pdPageTag").getAttribute("categoryId")); scriptUrl += &productIdListCsv= + encodeURIComponent(productIdListCsv); var scriptElement=document.createElement('script'); scriptElement.setAttribute("type","text/javascript"); scriptElement.setAttribute("async","async"); scriptElement.setAttribute("src", scriptUrl); document.body.appendChild(scriptElement); } pdInit(); </script> <!-- ************************************************** --> <!-- ********* FINISH PD INTEGRATION SCRIPT *********** --> <!-- ************************************************** -->