Shopping Cart Example (turn) (Shopping cart page)

Source: Internet
Author: User
Tags include
Shopping Cart | Page <!--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") ' is used to detect whether it is a normal purchase after the entry into the shopping cart fetch obj parameters
Rid=session ("id") ' Take out member ID
Dim x,i
Dim Obj_bag,bag_item,cart
' Obj_bag----Shopping cart
' Bag_item----Product Information data collection
' Cart----Information data collection for a product
Dim p_id,p_name,p_price,p_manu,p_type,p_size,p_color,p_num,p_total,sum
' P_ID----Product ID number
' P_name----Product Name
' P_price----Price
' P_manu----manufacturer
' P_type----Product style
' P_size----size
' P_color----Color
' P_num----Quantity
' P_total----Subtotal
' Sum----total amount

Dim id1

If obj= "1" then obj is 1 description by the menu bar click into the
If not IsObject ("Bag") then if the session ("Bag") is not an object, the cart is empty
Response.Write "<script language=" "JavaScript" ">"
Response.Write "Alert (" "Shopping cart is empty!"); "& Chr (13)
Response.Write "window.location= ' index.asp '"
Response.Write "</script>"
Response.End
Else
Set Obj_bag=session ("bag") if the shopping cart is not empty, assign it to an object obj_bag
End If
Else
If IsObject (Session ("Bag")) then &AMP;NB



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.