Danh mục

(ASP)Code giỏ hàng

Số trang: 8      Loại file: doc      Dung lượng: 30.00 KB      Lượt xem: 18      Lượt tải: 0    
tailieu_vip

Hỗ trợ phí lưu trữ khi tải xuống: 2,000 VND Tải xuống file đầy đủ (8 trang) 0
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Đây là tài liệu lập trình - (ASP)Code giỏ hàng gửi đến các bạn độc giả tham khảo.
Nội dung trích xuất từ tài liệu:
(ASP)Code giỏ hàng (ASP)Code giỏ hàngDau tien la include cua shoppingcar : de shoppingcart su dung ma thuc hien cac cau lenhFile: include-shoppingcart:0 and flag=falsethen lam sao de refresh k bi tang arrCounts(i)=CStr(Cint(arrCounts(i))+1) flag=true exit for end if Next session(ProductList)=join(arrProducts,,) session(ProductCount)=join(arrCounts,,) end ifend ifend subpublic Sub xoasp(pid) strList=Session(ProductList) countList=Session(ProductCount) if trim(pid) then if inStr(strList,pid)=0 then exit sub else arrProducts=split(session(ProductList),,) arrCounts=split(session(ProductCount),,) For i=0 To uBound(arrProducts) If inStr(arrProducts(i),pid)>0 Then arrCounts(i)=0 arrProducts(i)=0 Exit For End If Next session(ProductList)=join(arrProducts,,) session(ProductCount)=join(arrCounts,,) Loai bo cac product co so luong 0 session(ProductList)=Replace(session(ProductList), 0,, ) session(ProductCount)=Replace(session(ProductCount), 0,,) end if end ifend SubPublic Sub xoatatca session(ProductList)= session(ProductCount)=end SubSub UpdateQuantity(pid,Qty) arrProducts=split(session(ProductList),,) arrCounts=split(session(ProductCount),,) For j = 0 to UBound(arrProducts) if inStr(arrProducts(j),pid)>0 then arrCounts(j)=trim(Cstr(Qty)) exit for end if Next session(ProductList)=join(arrProducts,,) session(ProductCount)=join( arrCounts,,) End Subcloseconn%>con day la code cua shoppingcart#a:hover{text-decoration:underline}Untitled Documentfor i=0 to ubound(Qty_arr) UpdateQuantity id_arr(i),Qty_arr(i)Next strList=session(ProductList) strList=Left(strList,(len(strList)-1)) strListArray=split(strList,,) countList=session(ProductCount) countListArray=split(countList,,)end ifif(action=xoasp) then xoasp idend ifif(action=xoatatca) then RemoveAllend if%> GIO HANG STT TEN SAN PHAM DON GIA SO LUONG THANH TIEN (VND) Tiep tuc mua hang Xoa Tong tien (VND): Co san pham trong gio hang cua ban!

Tài liệu được xem nhiều: