<% dim dgsp dgsp=0'代购 '为了解决购物车不同步的问题 by cms begion if session("basketid")="" or isnull(session("basketid")) then session("basketid")= Request.Cookies("jafei")("basketid") end if %> <% '为了解决购物车不同步的问题 by cms current_basketid=session("basketid") if current_basketid<>"" then set myrs=server.CreateObject("adodb.recordset") 'myrs.Open "SELECT t.*,p.saletype FROM t_business_BasketItem t, product p where t_business_BasketItem.isActived='1' and t.product.id=p.id and p.saletype<>4 t_business_BasketItem.BasketID = " & current_basketid,conn,1,1 sql="SELECT t.*, p.saleType FROM t_business_BasketItem t INNER JOIN product p ON t.ProductID = p.id WHERE (t.isActived = '1') AND (saletype not like '%4%' and saletype not like '%6%') AND t.BasketID = " & current_basketid myrs.Open sql,conn,1,1 'response.Write sql total_price=0 icount = 0 if myrs.RecordCount=0 then 'session("basket_tag")="No_item" else 'session("basket_tag")="Have_item" do while not myrs.EOF icount = icount + myrs("quantity") salprice = myrs("vip_price") total_price=total_price+salprice*myrs("quantity") myrs.MoveNext loop myrs.close end if session("cart_total") = formatnumber(total_price,2) session("cart_count") = icount set myrs = nothing end if %>
购物流程--查看购物车
<% if current_basketid="" then Response.Write "
您的购物车里没商品!你可以返回首页添加商品。
" else set myrs=server.CreateObject("adodb.recordset") myrs.Open "SELECT product.pic,product.sortsid,pinpaiid, xianshiprice,pagepath,id,t_business_BasketItem.* FROM t_business_BasketItem INNER JOIN product ON t_business_BasketItem.ProductID = product.id where product.dgsp=0 and t_business_BasketItem.isActived='1' and saletype<>4 and t_business_BasketItem.BasketID = " & current_basketid,conn,1,1 productid=0 sortsid=0 if myrs.RecordCount=0 then session("basket_tag")="No_item" Response.Write "
您的购物车里没商品!你可以返回首页添加商品。
" else productid=myrs("productid") sortsid=myrs("sortsid") pinpaiid=myrs("pinpaiid") session("basket_tag")="Have_item" %>
  • 购买的商品
<%if pinpaiid=94 then%> <%end if%> <%total_price=0 icount = 0 do until myrs.EOF icount = icount + myrs("quantity") %> <% 'If Session("duihuanProductID")<>"" then if pinpaiid=94 then%> <% End if%> <%'if vip=1 then salprice = myrs("vip_price") %> <% ' else ' salprice = myrs("mem_price") ' end if%> <% Mysalejifen = Mysalejifen + myrs("salejifen")*myrs("quantity") total_price=total_price+salprice*myrs("quantity") myrs.MoveNext loop session("cart_total") = formatnumber(total_price,2) session("cart_count") = icount %>
图片 编号 商品名称需要积分单价 数量 本商品合计 删除
" target="_blank">" width="40" height="40" hspace="6" border="0" align="middle"/> <%=myrs("id")%> " target="_blank"><%=myrs("productname")%><%=MyRs("salejifen")%>¥<%=myrs("xianshiprice")%>" /> " /> " size="3" value="<%=myrs("quantity")%>" maxlength="4" onBlur="javascript:check_Value(document.frm_cart.q_<%=myrs("basketitemid")%>,<%=myrs("quantity")%>)" /> *<%=myrs("quantity")%>" /> ¥<%=salprice*myrs("quantity")%> );" style="cursor:hand;"/>
<% 'If Session("duihuanProductID")<> "" then if pinpaiid=94 then%> 合计需要积分:<%=Mysalejifen%> ,目前可用的积分:<%=Session("keyongjifenTemp")%>, <% session("jifen")=mysalejifen session("pinpai")=pinpaiid End if %> 总价(不包含运费):¥ <%=formatnumber(total_price,2)%> 元

       

<%end if end if%>
<% if current_basketid<>"" then %>
注:操作提示
修改定购商品的数量的时候
1、先在输入框输入数字; 2、点击“修改数量”按钮;3、然后再点击“提交订单“按钮。
<% End If %>