购物车问题

tingki 2008-05-13 09:19:34
请教一下各位大虾:我买一本机械出版社赛奎春主编的ASP信息系统开发实例精选,可书中的融E自选网进入购物车后,明明买了东西,但点收银台付款却提示你还没有购物。因为我急需用书中融E自选网,所以希望有高手可以指点指点,不甚感激。由于源程序大于1M,上传不了我把融E自选网的源代码和光盘说明上传了,万分乞求论坛高手帮助一下我这个可怜的菜鸟。
...全文
79 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
tingki 2008-05-13
  • 打赏
  • 举报
回复
购物车源程序在OrderForm文件夹中,好像不是OrderForm.asp就是data.asp
tingki 2008-05-13
  • 打赏
  • 举报
回复
我把购物车的源程序贴一下,大伙帮看看:<META http-equiv=Content-Type content="text/html; charset=gb2312"><%
'获取存放商品名称的数组信息
arys_1=session("array")
'获取存放对应商品价格的数组信息
ary2=session("array2")
'获取对应商品的购买数量的数组信息
ary=session("array3")
'判断用户是否已经购买商品
if isarray(arys_1) then
for i=0 to ubound(arys_1)-1
str=str+arys_1(i)+","
str2=str2+cstr(ary(i))+","
str3=str3+cstr(ary2(i))+","
next
'提取订单中的参数
yonghu=session("name")
jine=request.form("jine")
names=request.form("name")
addre=request.Form("address")
email=request.Form("email")
phone=request.Form("phone")
meg=request.Form("memo")
dingdan=request.Form("hidennumber")
fangshi=request.Form("select")
yunshu=request.Form("typ")
agio=request.Form("agio")
%>
<!-- #include file="../Conn/conn.asp" -->
<%
'将订单中的参数存放到数据库中
sql="insert into tb_OrderForm values('"&dingdan&"','"&str&"','"&str2&"','"&str3&"','"&agio&"',"&jine&",'"&yunshu&"','"&names&"','"&phone&"','"&email&"','"&addre&"','"&meg&"','"&fangshi&"','新订单','无','"&date()&"')"
rs.open sql,conn
set rs=nothing
conn.close
set conn=nothing
%>
<!-- #include file="../Conn/conn.asp" -->
<%
sql="update tb_Account set Amount=Amount+"&jine&",Degree=Degree+1 where Name='"&yonghu&"'"
rs.open sql,conn
set rs=nothing
conn.close
set conn=nothing
%>
<!-- #include file="../Conn/conn.asp" -->
<%
sql="select * from tb_Account where Name='"&yonghu&"'"
rs.open sql,conn
if not rs.eof then
'获取用户的消费总额
amount=rs("Amount")
end if
'变量存储用户积分计算参数
variable=int(session("Integral"))
'计算用户的积分 公式为"消费总额/积分计算参数"
integral=int(amount/variable)
session("jifen")=integral
'计算会员的等级
if integral<5 then
step="普通会员"
agio=100
else
if integral<10 then
step="三级会员"
agio=95
else
if integral<30 then
step="二级会员"
agio=90
else
if integral<50 then
step="一级会员"
agio=80
else
if integral<100 then
step="VIP会员"
agio=65
else
step="终身会员"
agio=50
end if
end if
end if
end if
end if
%>
<!-- #include file="../Conn/conn.asp" -->
<%
sql="update tb_Account set Integral="&integral&",Agio="&agio&",Step='"&step&"' where Name='"&yonghu&"'"
rs.open sql,conn

set rs=nothing
conn.close
set conn=nothing
%>
<!-- #include file="../Conn/conn.asp" -->
<%
for i=0 to ubound(arys_1)-1
sql="update tb_Goods set Sell=Sell+"&ary(i)&" where Name='"&arys_1(i)&"'"
rs.open sql,conn

next
set rs=nothing
conn.close
set conn=nothing
session("array")=""
session("array2")=""
session("array3")=""
%>
<script language="javascript">
alert("订单已经接收!");
</script>
<object type="application/x-oleobject" id=closes classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="command" value="close">
</object>
<script language="javascript">
closes.Click();
window.open("../index.asp");
</script>
<% else %>
<script language="javascript">
alert("您还没有购物呢!");
</script>
<object type="application/x-oleobject" id=closes classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="command" value="close">
</object>
<script language="javascript">
closes.Click();
window.open("../index.asp");
</script>
<% end if %>
tingki 2008-05-13
  • 打赏
  • 举报
回复
不好意思,刚才贴发错了,源程序我上传了,标题为购物车有问题的融E自选网,tag为购物车

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧