Keep products in ezbasket after login?

Author Message

Nicklas Lundgren

Thursday 10 September 2009 11:41:46 am

Hi,

I am creating a webshop, and have a problem with the basket contents.

It will be possible to put products into the basket, without being logged in to the site.

When checking out, the user should have two options:

a) Log in to his account and use account information for the checkout process (like name, address etc.)

b) Checkout without logging in to the system, thus needing to fill in all fields manually in the checkout form.

My problem is that the basket is connected via a session_id to the anonymous users session. Thus, when the user is logging in, all products in the basket disappears.

I guess I need to transfer the products in the basket for the anonymous user to the one for the logged in user...

So basically I wonder if this has been done? Any suggestions?

Best regards,
/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

André R.

Thursday 10 September 2009 1:12:39 pm

Hi!

My guess is that your using 4.1.x?
If so then this is known issue and has been fixed in svn(4.1.4), issue and patch(use the second one) can be found here:
http://issues.ez.no/IssueView.php?Id=14937&activeItem=5

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Nicklas Lundgren

Thursday 10 September 2009 1:30:13 pm

Thanks, André, for quick and helpful reply!

Yes, I am using 4.1.3. I didnt realize that this was a bug, but I am sure the solution you refer to will be very helpful.

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Nicklas Lundgren

Friday 11 September 2009 6:41:04 am

I have now applied the patch, and it is working perfectly. Great, André!

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

André R.

Friday 11 September 2009 7:14:34 am

Nop ;)

And yes it was/is a bug.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:15:12
Script start
Timing: Jan 18 2025 16:15:12
Module start 'layout'
Timing: Jan 18 2025 16:15:12
Module start 'content'
Timing: Jan 18 2025 16:15:12
Module end 'content'
Timing: Jan 18 2025 16:15:12
Script end

Main resources:

Total runtime0.0155 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.0156152.6250
Module start 'layout' 0.00580.0030 740.640639.4453
Module start 'content' 0.00880.0048 780.085993.3359
Module end 'content' 0.01360.0019 873.421938.3047
Script end 0.0155  911.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003321.5270140.0002
Check MTime0.001811.6583140.0001
Mysql Total
Database connection0.00063.925010.0006
Mysqli_queries0.002415.283830.0008
Looping result0.00000.096810.0000
Template Total0.001610.310.0016
Template load0.00085.438210.0008
Template processing0.00074.782210.0007
Override
Cache load0.00063.751410.0006
General
dbfile0.00032.010980.0000
String conversion0.00000.063040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs