Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2009, 02:56 PM
Registered User
 
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Anonymous Shopping Cart

I am seeing a weird issue with my Beerhouse implementation.

Occasionally when an end user places an order - the order will carry a user id like b8b50b29-836d-471d-9054-7658f6b31c09 which is an anonymous user id in the aspnet_users table.

it appears that some shopping carts are not being switched over and assigned from an anonymous user id to the actual logged in user.

I am not sure if the problem is with my code or with the browser the end user is using or even maybe the settings within the browser ( like not to accept cookies)

Any suggestions as to possible causes would be greatly appreciated.

Last edited by Greathouse; July 27th, 2009 at 02:56 PM.. Reason: mistype
 
Old August 1st, 2009, 05:15 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Not sure what you mean, as the Order object has no UserID property.

The user who placed the order is stored in the AddedBy property. Is that possibly what you mean?
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 
Old August 10th, 2009, 11:10 AM
Registered User
 
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Correct

That is correct - I am sorry I wasn't clearer.

Every once in awhile I see an order with an 'added by' like '75a539b9-698d-4575-896f-e97c3f3e407c'

and issuing the following sql against my database returns a record

SELECT [ApplicationId]
,[UserId]
,[UserName]
,[LoweredUserName]
,[MobileAlias]
,[IsAnonymous]
,[LastActivityDate]
FROM [dbo].[aspnet_Users]
WHERE USERNAME='75a539b9-698d-4575-896f-e97c3f3e407c'
 
Old August 10th, 2009, 01:24 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

That is very odd. Just looking through the code of the original implementation, it doesn't seem like this is even possible, as the shopping cart cannot finish an order unless the current user is authenticated.

Perhaps you have altered your own implementation somehow?
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 
Old August 17th, 2009, 12:57 PM
Friend of Wrox
Points: 546, Level: 8
Points: 546, Level: 8 Points: 546, Level: 8 Points: 546, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 105
Thanks: 3
Thanked 20 Times in 19 Posts
Default

If you are working from the English version of the book take a look at page 443. Otherwise, ensure you have modified the Profile_MigrateAnonymous event handler in the global.asax file to migrate the shopping cart from the anonymous user to the logged in user.





Similar Threads
Thread Thread Starter Forum Replies Last Post
shopping cart keyvanjan Classic ASP Basics 1 January 9th, 2007 10:16 PM
Shopping Cart seannie ASP.NET 2.0 Basics 0 December 12th, 2006 10:28 AM
Shopping cart help rsm42 ASP.NET 1.0 and 1.1 Basics 3 December 9th, 2006 06:09 AM
shopping cart xipnl BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 June 10th, 2005 07:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.