WordPress.com



<script type="text/javascript" src="~/jquery.shop.js"></script><link rel="stylesheet" type="text/css" href="" /><script type="text/javascript" src=""></script><div class="container" style="padding-top:30px;"><h2 class="tab-title">Checkout Products</h2> <table id="productlist" class="table"> <thead> <tr> <th>Product</th> <th>Price</th> <th>Quantity</th> </tr> </thead> <tbody></tbody> </table> {% if page.adx_entityform %} {% entityform id: page.adx_entityform.id %} {% endif %} <script> $(document).ready(function() { var jsonvalue = sessionStorage.getItem("winery-cart"); var obj = JSON.parse(jsonvalue); var lakeTbody = document.querySelector("#productlist tbody"); addDataToTbody(lakeTbody, obj.items); $("#sat_productsjson").hide(); $("#sat_productsjson_label").hide(); $("#sat_productsjson").val(jsonvalue);});function addDataToTbody(nl, data) { // nl -> NodeList, data -> array with objects data.forEach((d, i) => { var tr = nl.insertRow(i); Object.keys(d).forEach((k, j) => { // Keys from object represent th.innerHTML var cell = tr.insertCell(j); cell.innerHTML = d[k]; // Assign object values to cells }); nl.appendChild(tr); })} </script></div> ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download