表有匯PC端購物車功能實現
加入購物車後的結算功能
購物車頁面:
![](http://static.javashuo.com/static/loading.gif)
購物車頁面html代碼:
![](http://static.javashuo.com/static/loading.gif)
- <div class="cart_box">
-
- <!--購物車-->
- <h1 class="main_tit">
- <span><a onclick="DeleteClear(this,'/','0');" href="javascript:;">清空購物車</a></span>
- 我的購物車<strong>Shopping Cart</strong>
- </h1>
- <div class="cart_step">
- <ul>
- <li class="selected"><span>1</span>放進購物車</li>
- <li><span>2</span>填寫訂單信息</li>
- <li class="last"><span>3</span>支付/確定訂單</li>
- </ul>
- </div>
- <div class="line20"></div>
-
- <table width="938" border="0" align="center" cellpadding="8" cellspacing="0" class="cart_table">
- <tbody><tr>
- <th width="64"></th>
- <th align="left">商品名稱</th>
- <th width="110" align="center">顏色</th>
- <th width="80" align="center">積分</th>
- <th width="80" align="center">單價</th>
- <th width="80" align="center">數量</th>
- <!--<th width="80" align="center">優惠</th>-->
- <th width="100" align="center">金額小計</th>
- <th width="100" align="center">積分小計</th>
- <th width="50" align="center">操作</th>
- </tr>
-
-
- <tr>
- <td><a target="_blank" href="/goods/show-62.html"><img src="/upload/201505/04/201505041442488793.jpg" class="img"></a></td>
- <td><a target="_blank" href="/goods/show-62.html">韓國樂智迅時尚正品手錶學生男表女表運動防水糖果色果凍表石英錶</a></td>
-
- <!--顏色-->
- <td align="center">黑色<input name="goods_color" type="hidden" value="黑色"></td>
-
- <!--積分-->
- <td align="center">
-
- +
-
- 10
- </td>
- <!--價格-->
- <td align="center">¥2600.00<input name="goods_price" type="hidden" value="2600.00"></td><!-- value=用戶價格 -->
- <!--數量-->
- <td align="center">
- <a href="javascript:;" class="reduce" title="減一" onclick="CartComputNum(this, '/', '62', -1);">減一</a>
- <input type="text" name="goods_quantity" class="input" style="width:30px;text-align:center;ime-mode:Disabled;" value="1" onblur="CartAmountTotal(this, '/', '62');" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))">
- <a href="javascript:;" class="subjoin" title="加一" onclick="CartComputNum(this,'/', '62', 1);">加一</a>
- </td>
- <!--優惠-->
- <!--<td align="center">¥<label name="discount_amount"></label></td>-->
- <!--金額小記--> <!-- string轉換成int -->
- <td align="center"><font color="#FF0000" size="2">¥<label name="real_amount">2600</label></font></td>
- <td align="center">
- <font color="#FF0000" size="2">
-
- +
-
- <label name="point_count">10</label>
- </font>
- </td>
- <td align="center"><a onclick="DeleteCart(this,'/','62');" href="javascript:;">刪除</a></td>
- </tr>
-
-
- <tr>
- <th colspan="9" align="right">
- 商品件數:1 件 商品總金額(不含運費):<font color="#FF0000" size="2">¥2600</font>元 總積分:<font color="#FF0000" size="2">10分</font>
- </th>
- </tr>
-
- </tbody></table>
- <div class="line20"></div>
- <div class="right">
- <a class="btn" href="/index.html">繼續購物</a>
-
- <a class="btn btn-success marL10" href="/shopping/confirm.html">馬上去結算</a>
-
- </div>
- <div class="clear"></div>
- <!--/購物車-->
-
-
- </div>
對照一下商品的顏色、數量等是否選擇正確,如果無誤可以點擊馬上結算按鈕,進入訂單信息界面,填寫信息
訂單信息界面:
![](http://static.javashuo.com/static/loading.gif)
訂單信息頁面html代碼:
![](http://static.javashuo.com/static/loading.gif)
填寫好必要的信息(如:收貨人姓名、地址、手機號碼、快遞、付款方式等),點擊確認提交按鈕進入支付界面;
支付界面:![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
支付頁面html代碼:
- <div class="cart_box">
- <h1 class="main_tit">
- 支付中心<strong>Payment</strong>
- </h1>
-
- <!--提交支付-->
-
- <!--提交支付-->
- <form id="pay_form" name="pay_form" method="post" action="/api/payment/balance/index.aspx" target="_blank">
- <input id="pay_order_no" name="pay_order_no" type="hidden" value="b15061907244648"> <!--hidden-->
- <input id="pay_order_amount" name="pay_order_amount" type="hidden" value="2614.00">
- target="_blank">
- <input id="pay_order_no" name="pay_order_no" type="hidden" value="b15061907244648"> <!--hidden-->
- <input id="pay_order_amount" name="pay_order_amount" type="hidden" value="2614.00">
- <input id="pay_user_name" name="pay_user_name" type="hidden" value="admin00">="pay_order_no" name="pay_order_no" type