Connecting Tech Pros Worldwide Forums | Help | Site Map

shopping cart problem

=?Utf-8?B?Q2hpV2hpdGVTb3g=?=
Guest
 
Posts: n/a
#1: Jan 29 '07
i just finished creating an asp.net application named booksApp.

during the testing phase uploaded live ( ex: www.bookies.com) , i tried to
purchase something and add it to my shopping cart.

then, i tried opening the application on a different client computer. I just
randomly checked the shopping cart and there i found the same items i added
to my cart on the first computer.

all i did using to add to my cart was session("cart").

how can i just save the contents of the current cart to the current machine
being used?

thanks a million guys!


Aidy
Guest
 
Posts: n/a
#2: Jan 29 '07

re: shopping cart problem


all i did using to add to my cart was session("cart").

You must have done something different, can you post some relevant code?
You're not using shared (vb) / static (c#) variables anywhere are you?


Mark Rae
Guest
 
Posts: n/a
#3: Jan 29 '07

re: shopping cart problem


"ChiWhiteSox" <ChiWhiteSox@discussions.microsoft.comwrote in message
news:67FBA96F-A98C-4492-AEA7-B8CD5110C884@microsoft.com...
Quote:
>i just finished creating an asp.net application named booksApp.
Yesterday, you'd just finished creating an application called 'teddybears' -
you are a busy person, aren't you...? :-)

Which application will you just have finished tomorrow, I wonder...?


Mark Rae
Guest
 
Posts: n/a
#4: Jan 29 '07

re: shopping cart problem


"Aidy" <aidy@noemail.xxxa.comwrote in message
news:rYqdndW8soqZuCPYRVnyjAA@bt.com...
Quote:
You're not using shared (vb) / static (c#) variables anywhere are you?
He certainly is - see his virtually identical post from yesterday - only the
names have been changed to protect the innocent, etc...;-)


=?Utf-8?B?Q2hpV2hpdGVTb3g=?=
Guest
 
Posts: n/a
#5: Jan 29 '07

re: shopping cart problem


hi, thats the same guy :)

i changed it coz its hard to find my old post ...

anyways, heres the code (again)

Dim ala As New ShoppingCart

If Not IsNothing(Session("shoppingcart")) Then
ala = Session("shoppingcart")
End If

Dim objCartItem As New cartitem
Dim intItems As Integer

objCartItem.itemcode = seqid
objCartItem.itemname = seqname
objCartItem.qty = Qty
objCartItem.ddate = eventDate
objCartItem.unitprice = unit
objCartItem.total = objCartItem.unitprice * objCartItem.qty

ala.addCartItem(objCartItem)
Session("cartcount") = ala.CountItemsinCart.ToString
Session("shoppingcart") = ala

----------------------------------------------------------
on Global.vb class:
----------------------------------------------------------
Public _ItemsinCart As New Collections.ArrayList

----------------------------------------------------------
on a separate class called ShoppingCart.vb :
----------------------------------------------------------
Public Structure cartitem

Public itemcode As String
Public itemname As String
Public ddate As DateTime
Public unitprice As Decimal
Public total As Decimal
Public coupon As String
Public grandtotal As Decimal
Public qty As Long
Public schedulecode As String
End Structure


Public Sub addCartItem(ByVal item As cartitem)
If Not isItemExists(item) Then
_ItemsinCart.Add(item)
End If
End Sub


"Mark Rae" wrote:
Quote:
"ChiWhiteSox" <ChiWhiteSox@discussions.microsoft.comwrote in message
news:67FBA96F-A98C-4492-AEA7-B8CD5110C884@microsoft.com...
>
Quote:
i just finished creating an asp.net application named booksApp.
>
Yesterday, you'd just finished creating an application called 'teddybears' -
you are a busy person, aren't you...? :-)
>
Which application will you just have finished tomorrow, I wonder...?
>
>
>
Mark Rae
Guest
 
Posts: n/a
#6: Jan 29 '07

re: shopping cart problem


"ChiWhiteSox" <ChiWhiteSox@discussions.microsoft.comwrote in message
news:58740DAF-6F55-4C94-A40A-FDF64A380625@microsoft.com...
Quote:
i changed it coz its hard to find my old post ...
Er...OK

I have already replied to this.


Closed Thread