That is correct, if you have the same item name then yes this is correct.
The best way to do this is when the name is the same (best example would be
product code) to then increment the quantity purchased.

I haven't seen the example code on web monkey, however from what I did read
on the subject when they posted the subject was a very basic idea of a
shopping cart.

It is simple logic that if it already exists then increment the products
quantity, from what you are saying they don't do this. Unless they give the
option of selecting the quantity before doing the insert then it might be a
case of changing the quantity to the new value:-)



regards

Andrew Scott
ANZ eCommerce Centre
* Ph 9273 0693  
* [EMAIL PROTECTED]


-----Original Message-----
From: Chris Lott [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2000 15:37
To: [EMAIL PROTECTED]
Subject: Re: Question using structures...


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>Were you are getting confused is because it uses session variables,
> > session variables are tied to that browser connected at that time
> and is unique:-)  
> 
> Refer to session, client, cookies for more information on this:-)

I think I get that. What I am asking about is, specifically, this
section:

   if (not(structKeyExists(session.cart, attributes.name))) {
    StructInsert(session.cart,attributes.name,tempvalue);
   }

where it checks if the item is already in the cart by looking for the
key attributes.name -- doesn't this mean they couldn't carry two
items with the same name? Is this just an oversight when the cart
should be using attributes.id instead?

c
- - --
Chris Lott


-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.3
Comment: KeyID: 0x51046CFD

iQA/AwUBOaDAC9aLYehRBGz9EQJ4HACg9fIPTKZPl1khSCukBVbSGQFMrGoAoLyz
Bd5/hUIXwf006Hk02x/L96T1
=qIIr
-----END PGP SIGNATURE-----


----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to