473,394 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Basket Question

I want to allow customer to 'Add to Basket' even if they are not logged.
Once they log the content of the basket will be saved for the future

Next time they may add other items to the basket before they log and then
they may log

What is expected at that point?

Merge the content of the baskets delete the old one or else

Thank you for your advice,
Samuel
Oct 3 '06 #1
2 1429
I haven't seen site that work both ways.

Either you can always add things to the basket, and the basket does not get
saved between sessions or between PC's or whatever. Or, when you try to put
something in the basket you get prompted to log in so the contents of the
basket can be saved on the server. I don't think I've seen both models.

"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:Oy**************@TK2MSFTNGP04.phx.gbl...
>I want to allow customer to 'Add to Basket' even if they are not logged.
Once they log the content of the basket will be saved for the future

Next time they may add other items to the basket before they log and then
they may log

What is expected at that point?

Merge the content of the baskets delete the old one or else

Thank you for your advice,
Samuel

Oct 3 '06 #2
Hi Samuel,

You can do exactly this with ASP.NET 2.0 using Anonymous Profiles and
Membership. Use anonymous profiles while the user is browsing and adding to
the basket and then migrate the contents once they log in.

More Here:

http://www.ondotnet.com/pub/a/dotnet...html?page=last

and here

http://msdn2.microsoft.com/en-us/library/ewfkf772.aspx
Ken
Microsoft MVP [ASP.NET]

Migrating Anonymous Profile Information

In some cases, your application might initially be maintaining
personalization information for an anonymous user, but eventually the user
logs in to your application. In that case, the user's identity changes from
the assigned anonymous user identity to the identity provided by the
authentication process.

When users log in (that is, when they stop being anonymous users), the
MigrateAnonymous event is raised. You can handle this event to migrate
information from the user's anonymous identity to the new authenticated
identity, if necessary. The following code example shows how to migrate
information when a user is authenticated.

Visual Basic Copy CodePublic Sub Profile_OnMigrateAnonymous(sender As
Object, args As ProfileMigrateEventArgs)
Dim anonymousProfile As ProfileCommon =
Profile.GetProfile(args.AnonymousID)

Profile.ZipCode = anonymousProfile.ZipCode
Profile.CityAndState = anonymousProfile.CityAndState
Profile.StockSymbols = anonymousProfile.StockSymbols

''''''''
' Delete the anonymous profile. If the anonymous ID is not
' needed in the rest of the site, remove the anonymous cookie.

ProfileManager.DeleteProfile(args.AnonymousID)
AnonymousIdentificationModule.ClearAnonymousIdenti fier()

' Delete the user row that was created for the anonymous user.
Membership.DeleteUser(args.AnonymousID, True)
End Sub

"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:Oy**************@TK2MSFTNGP04.phx.gbl...
>I want to allow customer to 'Add to Basket' even if they are not logged.
Once they log the content of the basket will be saved for the future

Next time they may add other items to the basket before they log and then
they may log

What is expected at that point?

Merge the content of the baskets delete the old one or else

Thank you for your advice,
Samuel

Oct 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ian N | last post by:
Hi, I've been working on a PHP Shopping Basket and have hit a problem. I wanted update the DB with the contents of the Array which forms the basket. This isn't a problem, however i'm unsure how...
4
by: Richard Pain | last post by:
OK - I have a shopping basket with data in a database. Once the person has successfully completed their order I want to be able to send them an email with the products ordered roughly in the...
3
by: nike | last post by:
please i need help. I am doing a wed site online shopping system for my school project, which requires some asp coding using vb script. I am new to asp and have no knowledge whatsoever on how to...
3
by: help | last post by:
please i need help. I am doing a wed site online shopping system for my school project, which requires some asp coding using vb script. I am new to asp and have no knowledge whatsoever on how to...
3
by: Samuel Shulman | last post by:
Hi I need to implement a shopping basket for my e-commerce website Scenarios are as follows 1. Website to offer shopping basket for all visitors including those who didn't log 2. Website...
5
by: finengin | last post by:
I have a basket of fruits (e.g. Apple, Orange, Banana, etc) in C++ and I want to "copy" its content into a different basket (deep copy). What issues should I be aware of and how to do it?? Thanks.
11
Fary4u
by: Fary4u | last post by:
Hi i've design the ASP shopping with MS Access database it's working fine there is no problem in LOCALHOST when i upload into the Host Server it's working fine but when u add product into...
1
by: Sparkhill | last post by:
I have this page that prints out the contents of a table and commits it to a table. thus the string is full of all the data from the list. At the moment i have a add to basket button that redirect to...
4
Fary4u
by: Fary4u | last post by:
Hi for the last few months i've just stuck in 1 error & i don't know how to figer it out could any body find out where is the problem gonna be ? it's working fine but when u add product into...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.