[Zope] Is e-commerce feasible with Zope?

Kevin Dangoor kid@kendermedia.com
Mon, 7 Feb 2000 12:46:33 -0500


----- Original Message -----
From: "Diego Dainese" <xdsi@xddainese.unive.it>
To: <zope@zope.org>
Sent: Monday, February 07, 2000 8:51 AM
Subject: [Zope] Is e-commerce feasible with Zope?


> The script will add the product to a shopping basket; later the
> customer can proceed to the checkout. Here she/he will be able to
> create an account on our site for later shopping.
>
> What I need is:
>
> - A means to implement the basket; with Apache+PHP I would use a
>   simple file containing a list of product codes, or an SQL table.
>
> - A means to set a cookie on the client browser and to associate the
>   it with a basket; with Apache+PHP I would use a SQL relation
>   cookie->basket, or I would put in relation the basket filename with
>   the cookie.

I have implemented something like this for byproducts.com. I'm storing the
carts in the ZODB. This is not desirable if your site is very busy, though,
because there can be issues if you have lots of concurrent writes going on.
(Note that, from what I've read in previous threads, I would have to have 5
people create new shopping carts at the same instant in order for one of
them to run into an error. That's a lot. When I said that the site would
have to be very busy, I meant *very*.)

There are two Zope products, FSSession and SQLSession which should handle
these things quite easily for you.

> - A means to store the products database; with Apache+PHP I would use
>   a simple SQL DBMS.

You could store the products database in the ZODB or in a SQL DB. Which one
you use will probably depend on what you want to do with it, and how updates
are made to it. For example, if you were going to be doing something like
reloading the entire DB every hour (not likely, but just in case you were),
you would not want to use the ZODB with the FileSystem storage, because your
Data.fs file will grow quickly and need frequent packing.

Zope makes it easy to go either way on this one.

> - A means to store customer informations on the site; with Apache+PHP
>   I would use another SQL table, with a relation one to many to store
>   the (possibly) many customer's addresses.

Again, you can use SQL if you want. There's a whole bunch of work going on
right now to create new User objects in Zope. These will make it possible to
attach all sorts of things to users and will be a really nice abstraction.
Personally, I prefer to work with the ZODB wherever possible. I just
generally prefer objects to the relational model.

> - I would let the site to be accessed both via https and http.

There was recently a ZServer version announced with support for SSL.
Otherwise, I think people are just using Apache with fastcgi.

> - The site must be easily internationalized, thus I must be able to
>   replace all the text in the pages with a translated version; with
>   Apache+PHP I would use an include file where to store the text
>   messages as PHP constants.

There is a Zope Internationalization Project (ZIP), though I think that has
focused on adding more internationalization to Zope's core. For your own
apps, I would think there are a number of ways to implement this.
Acquisition is your friend. You'll probably use acqusition to make life easy
for you.

Kevin