[checkout] Empty Cart after log off

ominous2003

Joined: 2009-12-14
Posts: 2
Posted: Mon, 2009-12-14 10:34

Hi,
I'm am using the checkout module along with the checkoutemail module. I have no issues adding items to the cart. The issue is when the user logs off and then logs back on again the cart is empty. Is there any way to keep the contents of the cart between different logon sessions?
thanks.

Gallery URL = http://www.pondekas.com.au/Gallery/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.3 apache2handler
Webserver = Apache/2.0.52
Database = mysqli 5.0.48, lock.system=database
Toolkits = Getid3, LinkItemToolkit, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux lemon.cbr.hosting-server.com.au 2.6.9-89.0.16.ELsmp #1 SMP Tue Nov 3 17:34:21 EST 2009 i686
Default theme = carbon
gettext = enabled
Locale = en_GB
Browser = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Rows in GalleryAccessMap table = 13
Rows in GalleryAccessSubscriberMap table = 195
Rows in GalleryUser table = 4
Rows in GalleryItem table = 190
Rows in GalleryAlbumItem table = 4
Rows in GalleryCacheMap table = 0

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Mon, 2009-12-14 12:26
Quote:
Is there any way to keep the contents of the cart between different logon sessions?

Not really. When you log off, your session is wiped from the DB, taking the cart contents with it. When you log in again you start a new session but your old cart contents are long gone.

You'd have to rewrite the checkout code to store the cart contents in a separate table, keyed by userId, except for guests, who all share the same userId but have different carts.

 
ominous2003

Joined: 2009-12-14
Posts: 2
Posted: Mon, 2009-12-14 20:43

Ok, not the answer I was hoping for but thank you for the explanation and the quick response.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Mon, 2009-12-14 21:02

Actually there's another avenue you could explore - you could change the logout controller not to reset the session and just change the user credentials back the anonymous user. I haven't explored that possibility. It would mean changing core code, so you'd have to do it to your own installations.