(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
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!
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ìm kiếm theo từ khóa liên quan:
thủ thuật lập trình lập trình căn bản ASP ASP.Net (ASP)Code giỏ hàng tài liệu lập trìnhTài liệu liên quan:
-
114 trang 243 2 0
-
80 trang 222 0 0
-
Thủ thuật giúp giải phóng dung lượng ổ cứng
4 trang 217 0 0 -
NGÂN HÀNG CÂU HỎI TRẮC NGHIỆM THIẾT KẾ WEB
8 trang 210 0 0 -
Hướng dẫn lập trình với Android part 4
5 trang 156 0 0 -
Giáo trình Lập trình C căn bản - HanoiAptech Computer Education Center
136 trang 134 0 0 -
142 trang 130 0 0
-
Bài giảng lập trình c căn bản - Trường Apptech - Chương 4
27 trang 118 0 0 -
124 trang 114 3 0
-
150 trang 105 0 0