RE: [Webware-discuss] Shopping Cart App

2003-08-27 Thread Thomas Dennehy
Sent: Tuesday, August 26, 2003 7:01 PM To: [EMAIL PROTECTED] Subject: Re: [Webware-discuss] Shopping Cart App Hallo, Aaron Held hat gesagt: // Aaron Held wrote: > An easy way is to make the cart a list. > > def AddItem(item) >cart = self.session().value('cart'

Re: [Webware-discuss] Shopping Cart App

2003-08-26 Thread Frank Barknecht
Hallo, Aaron Held hat gesagt: // Aaron Held wrote: > An easy way is to make the cart a list. > > def AddItem(item) >cart = self.session().value('cart',[]) >cart.append(item) >self.session.setValue('cart',cart) > > def DelItem(item) >cart = self.session().value('cart',[]) >try

Re: [Webware-discuss] Shopping Cart App

2003-08-26 Thread Ian Bicking
On Tuesday, August 26, 2003, at 02:00 PM, Thomas Dennehy wrote: Is there a set of python classes that form the foundation of a “shopping cart” app? I just checked in an old class I had to do shopping cart functions. I make no claim of the elegance of its overall structure. It just stores the s

Re: [Webware-discuss] Shopping Cart App

2003-08-26 Thread Aaron Held
An easy way is to make the cart a list. def AddItem(item)     cart = self.session().value('cart',[])     cart.append(item)     self.session.setValue('cart',cart) def DelItem(item)     cart = self.session().value('cart',[])     try:           cart.remove(item)     except   ValueError:       

[Webware-discuss] Shopping Cart App

2003-08-26 Thread Thomas Dennehy
Is there a set of python classes that form the foundation of a “shopping cart” app? I’m working on the prototype of an online catalog (just presentation, no order processing) implemented in Webware. We’re at the point where we would like to let visitors select products and later review the