473,773 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1447
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.comwr ote in message
news:Oy******** ******@TK2MSFTN GP04.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
MigrateAnonymou s 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_OnMigra teAnonymous(sen der As
Object, args As ProfileMigrateE ventArgs)
Dim anonymousProfil e As ProfileCommon =
Profile.GetProf ile(args.Anonym ousID)

Profile.ZipCode = anonymousProfil e.ZipCode
Profile.CityAnd State = anonymousProfil e.CityAndState
Profile.StockSy mbols = anonymousProfil e.StockSymbols

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

ProfileManager. DeleteProfile(a rgs.AnonymousID )
AnonymousIdenti ficationModule. ClearAnonymousI dentifier()

' Delete the user row that was created for the anonymous user.
Membership.Dele teUser(args.Ano nymousID, True)
End Sub

"Samuel Shulman" <sa************ @ntlworld.comwr ote in message
news:Oy******** ******@TK2MSFTN GP04.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
1673
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 i use Relational Tables in MySQL. I have a table called Orders, which stores the CustomersID and also has an OrderID (this is an autoincrement integer)
4
1824
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 following format: Product Price Quantity prod1 £6.99 1 prod2 £5.99 2 Postage ...
3
1419
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 code what i need. Please please please could someone please provide me with help, or coding on how to add item details into a basket record, once the user clicks the add to basket link.
3
2926
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 code what i need. Please please please could someone please provide me with help, or coding on how to add item details into a basket record, once the user clicks the add to basket link. *** Sent via Developersdex http://www.developersdex.com...
3
1874
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 to offer shopping basket ONLY to those that are logged
5
2654
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
2004
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 basket it's bring automatically 1 extra product some time 2 or some time 3 i've not made a file called GLOBAL.asa for generate session but if some body add item into the basket it takes OrderID & using Session .
1
1348
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 another page and directly commits the item selected to a string and then you must press add to basket again. I would like to remove this second page and have item added directly to the basket but i do not know how to select this item specfically...
4
1898
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 basket it's bring automatically 1 extra product some time 2 or some time it's working fine i think so problem with GLOBAL.asa File that's not generating proper session variable GLOBAL.asa Sub Application_OnStart
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.