473,795 Members | 2,980 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Clear Shopping Cart tbl

USing ASP, MSSql on W2k3
I am worried of accumulated old cart product selections from expired browser
windows or other unforseen events.
I am holding selected productID's & quantities & userID & sessionID in a
sql table from a shopping cart.
I allow user to clear their cart from a button and also automatically clear
their cart on user logon.
Also on checkout I clear their cart.
I am storing selections with sessionID & UserID so they will be unique,.
But does anyone reccomend any other cart selection maintenance procedure i
could use,.

Regards
Don
Jul 22 '05 #1
3 1631
You could store the last activity time for each session in the table and
then schedule a job to run that executes something like:

DELETE FROM yourTable WHERE DATEDIFF (mi, LastActivity ,GETDATE()) > 20

Replace 20 with the your session timeout value. (Going higher than your
session timeout would be better. I'd probably use 60 and schedule it to run
every hour or something.)

Ray at work
"Don Grover" <dg*****@assoft .com.au> wrote in message
news:OL******** ******@TK2MSFTN GP10.phx.gbl...
USing ASP, MSSql on W2k3
I am worried of accumulated old cart product selections from expired browser windows or other unforseen events.
I am holding selected productID's & quantities & userID & sessionID in a
sql table from a shopping cart.
I allow user to clear their cart from a button and also automatically clear their cart on user logon.
Also on checkout I clear their cart.
I am storing selections with sessionID & UserID so they will be unique,.
But does anyone reccomend any other cart selection maintenance procedure i could use,.

Regards
Don

Jul 22 '05 #2
"Don Grover" wrote in message news:OL******** ******@TK2MSFTN GP10.phx.gbl...
: USing ASP, MSSql on W2k3
: I am worried of accumulated old cart product selections from expired
browser
: windows or other unforseen events.
:
: I am holding selected productID's & quantities & userID & sessionID in a
: sql table from a shopping cart.
: I allow user to clear their cart from a button and also automatically
clear
: their cart on user logon.
: Also on checkout I clear their cart.
: I am storing selections with sessionID & UserID so they will be unique,.
: But does anyone reccomend any other cart selection maintenance procedure
i
: could use,.

I keep track of date and time when the shopping experience began and remove
old carts older than 24 hours. One of the sites is quite busy and daily
maintenance takes care of all issues.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #3
Hello Don,

Did Ray and Roland answered your question? If you need more informaiton
about this issue, please feel free to let me know.

Luke

Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2869
by: Don Grover | last post by:
I am retrieving costs and product id's from a sql db. and need to build a shopping cart around it. How do I store the selected items and qty req so I can move into another catalog and total up as im going. Just a couple of hints will do, Im familiar with vb script but not java based code , and im wondering how to store what they select so I can move around different product ranges. Don
2
3318
by: Paul Bruneau | last post by:
Hi, I hope someone can help me make a working shopping cart, as a learning tool. If I have a "Product Demo" html page with a "Buy Me" button, there must be a simple javascript method of storing the necessary product information. There could be several fields involved... Then there ought to be another javascript method that can create a new document based on the list a user has built selecting product from several
1
3583
by: madison | last post by:
Hi, I am trying to start a website using paypals shopping cart function. If i have 10 items and they sell out, how do I make it so the item is then listed as sold out. The next person would not be able to come along and add it to their shopping cart. thanks joy
1
1822
by: Jia Sun | last post by:
hello , everybody , i need a similar program , just like fancyimport.com if possible, pls contact me ,thank you very much . inchina@gmail.com
1
3230
by: Adil Akram | last post by:
I have created a site shopping cart in ASP.net. I am using ASP session object's SessionID on non SSL connection to track session. While adding products to cart DB I insert product and SessionID in table. All products and cart status pages are on non SSL connection. On checkout to get secure user information I shifted connection to SSL but when shifting to SSL, the SessionID changed (As is this is default behavior of IIS to prevent...
7
2636
by: isaac2004 | last post by:
hi i have a basic asp page that acts as an online bookstore. on my cart page i am having trouble generating 3 numbers; a subtotal, a shipping total, and a final price. here is my code i would like it to work properly so that a record count counts through all the books and genertates these numbers. watch out for line breaks <%@ Language=VBScript %> <% Option Explicit %> <!--#include file="DatabaseConnect.asp"-->
1
7301
by: jecha | last post by:
I'm implementing a shopping cart but am having a problem in checking out a person who has added item in his/her shopping busket.The code for the checkout.php script is given below <? require_once('functions.inc.php'); session_start(); do_html_header("Checkout"); $cart = $_SESSION; if($cart&&array_count_values($cart)) { display_cart($cart,false,0); display_checkout_form($HTTP_POST_VARS);
15
4301
gregerly
by: gregerly | last post by:
Hello, I once again turn to this community of genius' for some help with a problem. I've got a shopping cart (which is working well so far) that I will be implementing all kinds of AJAX functionality on. However, first I want to make sure it works if javascript is not available. So when your on the shopping cart page, you can update the quantities then click Update Cart, which would update the totals, and refresh the shopping cart page,...
3
2895
by: Paulo | last post by:
Hi, beginner on asp.net 2.0 C# VS 2005, how can I use the shopping cart concept on my application? When the user clicks add item, it will be stored on some storage format, I dont know what is the term: temp/global DataSet, etc... and it should be read on other web-form to checkout the items... Can you point me to the right direction? Thank you very much!
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10217
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.