Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 forgeting cart
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kkemper
Starting Member

12 Posts

Posted - May 13 2004 :  10:29:35  Show Profile  Visit kkemper's Homepage  Reply with Quote
I need a little help,

If you ad items to my cart then even accidentaly close the browser, reopen it and go back to the site. When you view the cart it says it is empty. I have been unable to get it to remember them. I have the session variable set to 20.

Any suggestions

Kevin

jonmadrid
VP-CART New User

USA
192 Posts

Posted - May 13 2004 :  15:35:18  Show Profile  Visit jonmadrid's Homepage  Reply with Quote
Hi Kevin,

The session state is cleared when the browser is closed so even if you come 'right' back after closing the window, there won't be anything in your session variables to draw on.

Thats where the concept of cookies comes in: they are able to create a qausi-stateless environment where info can be stored, left alone for a while, then retrieved at a later time. The session object does all of that as well, but it only does it for the length of time you specify (default is 20 minutes) and so long as you don't close the browser (or go to another site). Cookies persist until the date or time you specify that they expire.

You could modify the cart to write the product information to a cookie at the same time it writes it to the session variables. That way, if the session object produced a blank value (if browser was closed or user navigated away from site), you could fall back on the values that were put in the cookies. I'm not sure what it would take to do that, or how feasible it would be but thats the first solution that comes to mind.

Hope that helps.



All the best,

Jon Madrid
--------------------
Madrid Communications
Web Design, Development, and Hosting
www.madridcom.com
Go to Top of Page

jsbeads
Starting Member

USA
39 Posts

Posted - May 14 2004 :  06:33:21  Show Profile  Visit jsbeads's Homepage  Reply with Quote
I had talked with support a while back about something like this. They advised me not to use cookies, the simply said that it would not work.

I'm using v3.xx so that may have changed by now.



Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00