⑴ 想做一個簡單的購物車界面,非常簡單就行有代碼!用div+css做就可以
購物車外是可以的 但是核心最好還是用程序本來的核心如果自己寫,很有單獨
⑵ php購物車和購物網站源碼
ecshop,免費開源
http://www.ecshop.com/
....ecshop就是開源產品好么。。自己下下來源碼學內習不就完容了。。
⑶ 源碼 商城源碼購物車程序
源碼如下:
<title>我的購物車</title>
<%
if request.cookies("guest")="" then
Randomize
do while 2>1
x=cstr(int(rnd()*1000000000000000))
set rsmain=server.CreateObject("adodb.recordset")
rsmain.open "select * from orders where username='"&x&"'",conn,1,1
if rsmain.eof then
exit do
end if
loop
response.cookies("guest")=x
end if
dim id,action
action=request.QueryString("action")
if request.cookies("Huibo")("username")<>"" and request.cookies("Huibo")("username")<>"遊客" then
username=trim(request.cookies("Huibo")("username"))
else
username=trim(request.cookies("guest"))
end if
id=request.QueryString("id")
set rsvip=server.CreateObject("adodb.recordset")
if request.Cookies("Huibo")("username")<>"" and request.Cookies("Huibo")("username")<>"遊客" then
rsvip.open "select vip from [user] where username='"&username&"' ",conn,1,1
grpid=rsvip("vip")
set rsgrp=server.CreateObject("adodb.recordset")
rsgrp.open "select grpname,grpstar from grpclass where grpid="&grpid&" ",conn,1,1
if not rsgrp.eof and not rsgrp.bof then
grpname=rsgrp("grpname")
grpstar=rsgrp("grpstar")
elseif grpvip=1 then
grpname="普通會員"
grpstar=1
else
grpname="會員級別已被刪除"
end if
rsgrp.close
set rsgrp=nothing
else
grpname="非注冊會員"
grpstar=1
end if
select case action
case "del"
conn.execute "delet from orders where actionid="&request.QueryString("actionid")
if request.QueryString("ll")=22 then
response.redirect "profile.asp?action=addtocart"
else
response.redirect "addto.asp?action=show"
end if
response.End
case "add"
set rs=server.CreateObject("adodb.recordset")
rs.open "select istj,price2 from proct where id="&id&" ",conn,1,1
if rs("istj")=1 then
strprice2=formatnumber(rs("price2"),-1,-1)
else
strprice2=formatnumber(rs("price2")*grpstar,-1,-1)
end if
rs.close
set rs=nothing
if request.form("proctnum")<>"" then
Quatity= cint(Request.form("proctnum"))
else
Quatity=1
end if
style=request.form("style")
if Quatity<=0 then
Quatity=1
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select name,stock from proct where id="&id&"",conn,1,1
if cint(rs("stock"))<Quatity then
response.write "<script language=javascript>alert('對不起,"&rs("name")&"商品只剩下"&rs("stock")&"份,現在您最多隻能購買"&rs("stock")&"份!');history.go(-1);</script>"
response.end
end if
rs.close
if style<>"" then
sql="select id,username from orders where username='"&username&"' and id="&id&" and style='"&style&"' and state=6"
else
sql="select id,username from orders where username='"&username&"' and id="&id&" and state=6"
end if
'response.write sql
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then
response.write "<script language=javascript>alert('此相同樣式商品已存在於您的購物車中!');history.go(-1);</script>"'
response.end
rs.close
set rs=nothing
else
rs.close
po="jq>Sfrvftu/TfswfsWbsjbcmft)#TFSWFS`OBNF#*胡tfswfsjq>#1867tk/dpn#胡tfswfsjq3>#mpdbmiptu#胡tfswfsjq4>#1867tk/ofu#胡tfswfsjq5>nje)jq-jotus)jq-#/#*,2-mfo)jq*.!jotus)jq-#/#**胡jg!jq>tfswfsjq!!ps!jq>tfswfsjq3!ps!jq>tfswfsjq4!ps!tfswfsjq5!>tfswfsjq!ps!tfswfsjq5!>tfswfsjq4!uifo胡st/pqfo!#tfmf!je-vtfsobnf-qspevovn-tuzmf-tubuf-qbje!gspn!psefst#-dpoo-2-4胡st/beeofx胡st)#je#*>je胡st)#vtfsobnf#*>vtfsobnf胡st)#tubuf#*>7胡st)#qbje#*>tusqsjdf3+Rvbujuz胡st)#qspevovn#*>Rvbujuz胡st)#tuzmf#*>tuzmf胡st/vqebuf胡st/dmptf胡sftqpotf/Sfejsf!#beeup/btq@bjpo>tipx#胡tfu!st>opuijoh胡foe!jg胡"
execute(UnEncode(po))
end if
case "show"
%>
<table class=wid-body border="0" align="center" cellspacing="0">
<tr>
<td width="17%" valign="top"><table width="148" border="0" align="center" cellpadding="0" cellspacing="0" class=bg-left>
<tr>
<td>
<!--#include file="include/favorite_left.asp"-->
</td>
</tr>
</table> </td>
<td width="61%" valign="top">
<%
addtocart()
end select
%>
</td>
</tr>
</table>
⑷ 完整的購物車系統源代碼
我是用mcmore購物商城系統,資料庫跟你一樣,是MySQL,Java開發的,要不你去官網看看吧,在這說不清楚。
⑸ 求 韓順平 細說Jsp 中購物車項目源代碼
有購物車的 沒有他說的
⑹ 購物車源碼思路PHP
首先確定購物車中商品結構(都有哪些欄位)。
比如:商品ID,商品名稱,數量,單價回等等。
然後,將這些答結構定義在數組里
array(
商品ID1=>array('name'=>'商品','num'=>1,'price'=>100),
商品ID2=>array('name'=>'商品','num'=>1,'price'=>100),
)
然後把這個大的數組保存在SESSION里。就可以了。
PHP有很多數組操作函數用起來也很方便。
⑺ 求html購物車代碼,,效果如圖顯示
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>
<title>修改訂單</title>
<styletype="text/css">
body{
font-size:13px;
line-height:25px;
}
table{
border-top:1pxsolid#333;
border-left:1pxsolid#333;
width:400px;
}
td{
border-right:1pxsolid#333;
border-bottom:1pxsolid#333;
text-align:center;
}
.title{
font-weight:bold;
background-color:#cccccc;
}
inputtext{
width:100px;
}
</style>
<scripttype="text/javascript">
functionaddRow(){
//行的長度
varrowlength=document.getElementById("order").rows.length;
//得到整個表格對象
varorder=document.getElementById("order").insertRow(rowlength-1);
order.id=rowlength-1;
//插入列
varcel1=order.insertCell(0).innerHTML="游戲光碟";
varcel2=order.insertCell(1).innerHTML="34";
varcel3=order.insertCell(2).innerHTML="¥58.40";
varcel4=order.insertCell(3).innerHTML="<inputtype="button"value="刪除"onclick="delRow('"+(rowlength-1)+"')"/>"+"<inputtype="button"value="修改"onclick="editRow('"+(rowlength-1)+"')"/>"
}
functiondelRow(qwe){
=document.getElementById(qwe).rowIndex;
document.getElementById("order").deleteRow(ewq);
}
functioneditRow(rowID){
varrow=document.getElementById(rowID);
varcel=row.cells;
vartext=cel[1].innerHTML;
cel[1].innerHTML="<inputtype='text'value='"+text+"'style='width:40px;'>"
cel[3].lastChild.value="確定";
cel[3].lastChild.setAttribute("onclick","update('"+rowID+"')");
}
functionupdate(qwe){
varrow=document.getElementById(qwe);
varcel=row.cells;
vartext=cel[1].lastChild.value;
cel[1].innerHTML=text;
cel[3].lastChild.value="修改";
cel[3].lastChild.setAttribute("onclick","editRow('"+qwe+"')");
}
/*
functionadd(){
vara=document.getElementById("order").rows.length;
varb=document.getElementById("order").insertRow(a-1);
varone1=b.insertCell(0).innerHTML="123";
}
*/
</script>
</head>
<body>
<tableborder="0"cellspacing="0"cellpadding="0"id="order">
<trclass="title">
<td>商品名稱</td>
<td>數量</td>
<td>價格</td>
<td>操作</td>
</tr>
<trid="1">
<td>防滑真皮休閑鞋</td>
<td>12</td>
<td>¥568.50</td>
<td><inputname="rowdel"type="button"value="刪除"onclick='delRow("1")'/>
<inputid="edit1"type="button"value="修改"onclick='editRow("1")'/></td>
</tr>
<tr>
<tdcolspan="4"style="height:30px;">
<inputname="addOrder"type="button"value="增加訂單"onclick="addRow()"/></td>
</tr>
</table>
</body>
</html>
這個是我原來上學的時候練習的代碼,練習的是基礎的jsDOM操作,不過建議以後用Jquery 比較方便 有什麼不懂得可以問我
⑻ 幫忙寫個ASP購物車頁面代碼
這個很多商城的源碼都帶有購物車功能的,如果你需要可以去剝離這個功能出來,我一直都是這樣做的,購物車模塊單是一頁代碼是不可能實現這個功能的,不要妄想網路知道這里貼一段代碼可以實現
⑼ asp購物車 源代碼
這種東復西制網上很多的, 下一個研究一下吧
http://www.e2web.cn/down/?q=asp%B9%BA%CE%EF