Forums / Developer / Keep products in ezbasket after login?

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

eZ debug

Timing: Jan 18 2025 11:34:03
Script start
Timing: Jan 18 2025 11:34:03
Module start 'content'
Timing: Jan 18 2025 11:34:03
Module end 'content'
Timing: Jan 18 2025 11:34:04
Script end

Main resources:

Total runtime0.1701 sec
Peak memory usage4,096.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 588.8672180.8281
Module start 'content' 0.00710.0073 769.695397.8828
Module end 'content' 0.01440.1557 867.5781526.8281
Script end 0.1701  1,394.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00422.4735200.0002
Check MTime0.00140.8300200.0001
Mysql Total
Database connection0.00140.794610.0014
Mysqli_queries0.122471.94821410.0009
Looping result0.00130.74401390.0000
Template Total0.155191.210.1551
Template load0.00100.558910.0010
Template processing0.154290.623010.1542
Override
Cache load0.00070.393210.0007
Sytem overhead
Fetch class attribute can translate value0.00090.555510.0009
XML
Image XML parsing0.00020.118110.0002
General
dbfile0.00170.9927200.0001
String conversion0.00000.003530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

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

Time used to render debug report: 0.0002 secs