当前位置: 首页 > 图文教程 > 网络编程 > ASP > 购物车范例(购物车页面 )

ASP
看人家用使用InstallShield制作ASP安装程序(5)
看人家用使用InstallShield制作ASP安装程序(4)
看人家用使用InstallShield制作ASP安装程序(3)
看人家用使用InstallShield制作ASP安装程序(2)
看人家用使用InstallShield制作ASP安装程序(1)
取得浏览者的离开时间
base64编码、解码函数
动态显示图片的函数(显示广告条)
发送带附件的HTML格式邮件例程可以带附件
一种在父窗口中得知window.open()出的子窗口关闭事件的方法
一个老个写的无组件上传
避免asp的SQL的执行效率低
树型结构在ASP中的简单解决
无需数据库循环的无级分类代码
检查字符串strSource是否为big或big5码
有关重复记录的删除(SQL SERVER)
WINDOWS2000服务器账号登陆身份验证
使用VC++6.0制作ASP服务器控件简介
利用sql的存储过程实现dos命令的asp程序
WSH 直接将查询数据结果生成 EXCEL 表

ASP 中的 购物车范例(购物车页面 )


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 77 ::
收藏到网摘: n/a

  <!--checkbag.asp-->

<!--shoppingcart page-->

<%  
    response.expires = 0
    response.expiresabsolute = Now() - 1
    response.addHeader "pragma","no-cache"
    response.addHeader "cache-control","private"
    Response.CacheControl = "no-cache"
%>

<!--#include file= "conn.asp"-->
<!--#include file= "char.inc"-->

<%
    'id_type=request("id_type")
    obj=request("obj")       '用做检测是否是正常购买后的进入购物车取obj参数
    rid=session("id")         '取出会员id
    dim x,i
    dim obj_bag,bag_item,cart
           'obj_bag          ----购物车
           'bag_item        ----商品的信息数据集合
           'cart                ----一件商品的信息数据集合
    dim p_id,p_name,p_price,p_manu,p_type,p_size,p_color,p_num,p_total,sum
            'p_id               ----商品id号
            'p_name         ----商品名称
            'p_price          ----价格
            'p_manu         ----制造商
        'p_type           ----商品式样
            'p_size           ----尺寸
        'p_color          ----颜色
            'p_num           ----数量
            'p_total           ----小计
            'sum              ----合计金额

    dim id1

    if obj="1" then                                     obj为1说明由菜单栏点击进入的
        if not isobject(Session("Bag")) then            如果Session("Bag")不是对象,说明购物车为空
            response.write "<script language=""javascript"">"
            response.write"alert(""购物车为空!"");" & chr(13)
          &nbs