Results 1 to 10 of 10

Thread: Shopping cart, non cookie

  1. #1

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547

    Shopping cart, non cookie

    Allright, well... I would like to create a shopping cart that is not based on cookies. Is this possible?
    I've seen various sites like amazon.com that seem not to use cookies for their shopping carts. How can this be done?

    An previous idea was to give each coming customer a unique ID and store their selection inside of a database. I would have no problem storing them in a database, however, how would it be possible to assign such a unique tag to each user? Would storing IP addresses work, since I would only need to store the data as long as the customer is browsing the site.

    Maybe then, I could write a cleanup script that deletes expired records?

    The reason why I Want to do this is to reach customers that do not use cookies... I noticed a few shopping carts on the internet that do not work just because you have cookies disabled. Is this even worth investigating? or should i just stick with the cookie solution...

    Any ideas?
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  2. #2

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    I have come to the conclusion that I could accomplish this by adding a unique ID in Global.asa that would identify that user for the current session. Theres only one catch.

    The plan is to insert a unique ID into global.asa to identify each user that comes to the website. I was thinking of using a GUID to do this, but I do not think it is possible to create a GUID with Javascript. (global.asa can only use javascript, vbscript, perl, you get the idea). These are all client side scripts, so making a unique guid would be impossible. So, what value would I use to identify the client then?

    ...wait, I could just use an integer starting from 1, and add an additional 1 every time another person starts the sessions. I could store this integer in Application_OnStart, and it would be updated in the Sessions_OnStart event and be incremeted by 1, therefore, I would not have to worry about unique ID's at all! WOW, the things you can accomplish by talking to yourself.

    What do you think, yay or nay?
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  3. #3

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    Ok heres the code:


    Code:
    function Session_OnStart()
    {
    	Application("SessionID") += 1;
    }
    
    function Application_OnStart()
    {
    	Application("SessionID") = 0;
    }
    How do I save this variable so it stays with that perticular user when he\she is browsing my website. What the code above does is update the sessionID every time a new user logs in OR the current user closes the webbrowser and reopens it.
    However, when I'm browsing the website, if another user opened up the website again my session ID would change to his session ID (+1). So, I need to find a way to save this variable localy? Any ideas.

    Come on, help me out here, I've been talking to myself for the past 3 posts!

    PS: Keep in mind im trying to stay away from cookies. (I realize that in order to use session variables the user still has to have cookies installed).
    However, I would prefer to do this without cookies if at all possible.
    Last edited by invitro; Aug 23rd, 2004 at 12:49 AM.
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  4. #4

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    So since ive been talking to myself the whole thread, here is some info incase anyone else is interested in what I was tryng to do.

    ----

    I found out that most shopping carts that do not use cookies but use the users IP address. There is no other unique identifier other then the persons IP address. However, its much easier to use cookies anyway... why?

    Because, if you have any kind of user login available for your customers, the authentication will have to use cookies anyway, so you mind as well create the shopping cart using cookies and save you the IP address trouble, since the customer would have to have cookies enabled for your login anyway. Also, in order to use the IP address you would have to store the shopping components into a database and so on....

    cookies make life easier, i wish people didn't disable them.

    If you need any other info lemme know I learned quite a bit about carts in the past few days.

    -Alek
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  5. #5
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    I am surprised I missed your thread! Where was it.

    Now, Since a lot of user here are asking about shopping cart I recently decided to write a tutorial. I have started it but havent had the time to finish it. I have put together a sample application and documentation which is not detailed yet.

    I used access databse to store the Item, only time i am using cookies is when user logs in, i create a session variable which uses cookies. So unless you go passing session id in url (which is not easy for a beginer) you will have to use session object.

    If you want i can email you what i have, PM me your email.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  6. #6
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Oh damn, i did email you the tutorial didn't i in some other thread. I just remembered now.

    Now let re-read the thread and see what you are after .
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  7. #7
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    I found out that most shopping carts that do not use cookies but use the users IP address. There is no other unique identifier other then the persons IP address. However, its much easier to use cookies anyway... why?
    IP is a good candidate for a unique idetifier, but it is neccessarryly unique if you are surfing under a networked environment, as all user will have the same IP address, how ever use of cookie + IP address will enable you to identify a user uniquely.


    Because, if you have any kind of user login available for your customers, the authentication will have to use cookies anyway
    Thats not a true statement, it is true that ASP (Classic) uess cookies to implement session. Not other language uses cookies to implement session like object.

    Also like i mentioned in my earlier post, you could implement cookie less state management buy appending a unique session ID to the URL, there are articles availble on this technique.

    ASP.net solves this problem of session being dependent on cookies, you have the option to either user cookie or URL appending.



    How do I save this variable so it stays with that perticular user when he\she is browsing my website. What the code above does is update the sessionID every time a new user logs in OR the current user closes the webbrowser and reopens it.
    However, when I'm browsing the website, if another user opened up the website again my session ID would change to his session ID (+1). So, I need to find a way to save this variable localy? Any ideas.
    I am not sure i understand what you are trying to do here. You do know that SessionID is unique for each user? You seem to be just incrementing a counter, you are not using this counter as ID are you?

    Any how let me know if you need me to explain anything.


    BTW : You would have probably got a quicker response if you posted this in ASP Forum.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  8. #8

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    Yeah I know what you mean Danial about the sessionID. however, the sessiond ID was stored in Application("SessionID"), therefore, every user could pull that variable. Yes I was going to use it as a unique identifier but its totaly out of the question since it just dosent behave the way i want it to.


    What im doing is basicaly storing everything in a cookie, hash, user guid, and username... then i authenticate the user each time they hit a page.


    So, my question would be, is it really worth migrating to asp.net
    looks like there are a lot of problems solved in .net, would it a big learning curve to switch from ASP 3 to .net?
    Also, would I actually have to get Visual Studio .net in order to work with it, or is it just a server side language like any other that can be coded in notepad.

    Thanks
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  9. #9
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    What im doing is basicaly storing everything in a cookie, hash, user guid, and username... then i authenticate the user each time they hit a page.
    That is fine and is a starndard way to authenticate in asp.

    So, my question would be, is it really worth migrating to asp.net
    looks like there are a lot of problems solved in .net, would it a big learning curve to switch from ASP 3 to .net?
    Ite depends, yes there is a big difference between ASP and ASP.net, though i didnt have any problem picking it up. Just get a decent book or follow some tutorial.

    Yes it is definately worth cosidering it as unlike asp , ASP.net is fully fledged programming language.

    Also, would I actually have to get Visual Studio .net in order to work with it, or is it just a server side language like any other that can be coded in notepad.
    No you dont need Visual Studio.net, like C++, Java you can use note pad to write your code, then you will need a Compiler (Provided free by MS) to compile the code. You can download .NET SDK which comes with all the base classes, documentation/example and Compiler for .Net.

    There are free Editor for .net e.g SharpEditor or something like that, which mimics the functionality of VS.Net IDE.

    Though I will have to say, without the VS.Net IDE the coding is much harder, as VS.Net comes with some extremely helpful features which cuts down the development time by a lot.

    If you are student, then you should be able to get a Educational Version for a nominal amount.

    Thanks [/B]
    You are welcome.

    Hope it helps.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  10. #10

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    Ok, so, ASP.net is a full programing language? ... how, umm... ok im a little confused. Meaning, you can compile your code into EXE's? I also have seen some ASP.net support on Jodohost.com, if asp.net is a language of its own, how would that work on a webserver... more answers bring more questions

    Yeah im a student, poor one too... perhaps i will look into the educational version of .net. I simply dislike getting educational versions because the contracts you get with them limit you to actually using the Software in order to make money... which of course makes sense.

    Anyhow, yes thanks and thanks again, i cant say it enough.
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width