Mobile POS Front End / web / paymentSummary.html

<!DOCTYPE html>
        <meta charset="utf-8">
        <title id="systemName">Mobile POS</title>

        <link href="css/bootstrap.css" rel="stylesheet">


        <div class="container">
            <img id ="mainBanner" src="img/banner.png" />

        <div class="container">
            <div class="row">
                <div class="span12  " id="div_productExecuteSummary">
                    <Legend id="receiptId"> Order </Legend>
                    <table class="table table-bordered" id="table_productExecuteSummary">
                                <th >Item(Qty)</th>
                                <th>Total Price</th>


                    <h5 id="TotalPrice"> </h5>
            <div class="row">
                <div class="span12  " id="div_customerDetails">
                    <Legend > Deliver details </Legend>

                    <table class="table table-bordered" id="table_customerDetail">
                                <th class="span2" >Name </th>
                                <td  id="td_customerName"></td>
                                <th>Address </th>
                                <td  id="td_customerAddress"> </td>
                                <th>Tel </th>
                                <td  id="td_customerTel"> </td>
                                <th>Email </th>
                                <td  id="td_customerEmail"> </td>


            <p class="offset4">
                <small>Thank you for shopping with iFurniture.</small>


        <script src="js/jquery-1.8.2.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <script src="js/json2.js"></script>
        <!-- config java script -->
        <script src="js/mainConfig.js"></script>

                var orderId = readCookie('orderId');
                var totalPrice = readCookie('grandTotal');
                $('#TotalPrice').text("Total: $"+totalPrice);
                //load recipt number 
                $('#receiptId').text("Receipt No - "+readCookie('receiptId'));
                //set customer delivery info   
                var customerDetail = $.parseJSON(readCookie('customerDetail'));

             *Function  load what the user has added the item in the shopping cart to the summary order page
            function getProductDataFromCookieAndDisplay()
                var shoppingCartCookie = new Array();
                shoppingCartCookie = $.parseJSON(readCookie('shoppingCart'));
                    for(var i=0;i<shoppingCartCookie.length;i++)
                        var productId = shoppingCartCookie[i].productId;
                        var productName = shoppingCartCookie[i].productName;
                        var productQty = shoppingCartCookie[i].productQty;
                        var productTotal = shoppingCartCookie[i].productTotal;
                        var productNameAndQty = productName+"("+productQty+")";
                        var tableDetailHeader ="<tr>";
                        var tableProductNameAndQty ="<td class=\""+productId+"\" id=\"productNameAndQty\">"+productNameAndQty+"</td>";
                        var tableProductTotal ="<td id=\"productTotal\">"+productTotal+"</td>";
                        var tableDetailFooter ="</tr>";
                        var entireTable = tableDetailHeader + tableProductNameAndQty + tableProductTotal +tableDetailFooter;
                        $("#table_productExecuteSummary > tbody:last").append(entireTable);
            function createCookie(name,value,days) {
                if (days) {
                    var date = new Date();
                    var expires = "; expires="+date.toGMTString();
                else var expires = "";
                document.cookie = name+"="+value+expires+"; path=/";
            function readCookie(name) {
                var nameEQ = name + "=";
                var ca = document.cookie.split(';');
                for(var i=0;i < ca.length;i++) {
                    var c = ca[i];
                    while (c.charAt(0)==' ') c = c.substring(1,c.length);
                    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
                return null;