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

ASP
ASP制作迅雷看看电影人气指数
Request.ServerVariables参数
rs.open和conn.execute
Rs.Open参数
什么是会话ID和如何使用会话ID
Service Unavailable问题
一些关于购物车的想法
几种常见的保护数据库的方法
验证码不正确,该如何解决?
ASP教程:过滤HTML代码并截取
IIS7中HTTP 500错误
学习ASP基础教程
ASP教程:ASP基础语法
学习ASP获取HTML表单提交信息的实例
301重定向全面认识
介绍一些常见的ASP平台的CMS
正则表达式简单学习
ASP教程:server.transfer方法实例
ASP实例教程代码实现禁止外部提交数据
ASP简单入门教程(1):认识ASP

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 59 ::
收藏到网摘: 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