Shopping Cart

This example shows how to use sessions. Notice that Zope remembers the contents of your shopping cart until you close your browser.

The contents of the cart are stored in a session. The session variable items keeps track of the item ids and quantities of items in your shopping cart. The currentItems script uses this information to retrieve records describing the items in the shopping card. The deleteItems script removes items from the shopping cart.

Your Shopping Cart

There are currently no items in your shopping cart.

Add Items

Item Description Price Quantity
Dust Free Bullet Waterer A favorite with many fanciers, this drinker has a dust cover over each individual drinking hole, to keep out the dirt and dust. $16.00
Hopper Feeder Need to go out of town for a few days, and no one can feed your pigeons? Don't worry, we now have the virtually spillproof hopper feeder. Made from birch plywood it holds from 30 to 35 pounds of grain. Pigeons can get at the feed through holes in the plexiglass cover, but will not be able to kick out any feed. $55.00
Econo Feeder These feeders are made in Taiwan from a light-weight metal with plastic ends, and have an anti-spill edge to prevent the birds from kicking the feed out of the tray. They have a wooden rollbar to prevent the birds from sitting on them. $7.95

The addItems script adds items to your shopping cart. The above form uses records to build an order list of to pass to the script. Each item in the order list has a id and a quantity field.