[Zope-CMF] Re: Zope - CMF http://www.AdirondackCraft.com

Brad Clements bkc@murkworks.com
Tue, 31 Jul 2001 21:21:20 -0400


On 1 Aug 2001, at 0:04, Norbert Marrale wrote:
 
> Is the ProductImage a roll-your-own CMF method? If so, are you 
> planning to make it available to the general community?

Sure, its no big deal. Basically I created a ZClass derived from OSF.Image, changed 
the edit method to call PIL and create a thumbnail. I do not think its ready for release 
because a) I don't handle the case where PIL raises an exception for unsopported 
graphic type, and b) the thumbnail data is stored in a string property which cannot be 
cached by a Cache Manager.

In fact this seems to be a problem with ZClass methods in general, I cannot see any 
way to get ZClass methods to have their output be cached. Perhaps I'm missing 
something somewhere.. 


> 
> Same question for ShoppingCart. This is the one big thing I'm missing in
> both the Zope core and CMF. 

The shopping cart is part of the ADK Craft site, which is not based on CMF. The cart is 
super easy. All I did was use an SQLSession object that gets created when a person 
puts something in their cart. In the session object I store a dict that uses the "product 
variant" as the key and qty as the value.

Product variant is like .. "size-small" for product "Joe Blow T-Shirt" which is a child of 
Product Group "T-Shirts" which are made by a manufacturer. (so, 4 levels of sql 
relationship between the variation of a product and it's manufacturer) Lotsa joins in 
those selects..

But this has nothing to do with the cart. Just use SQLSession, it's easy.

When you checkout, we read the dict item from the session and populate a line-items 
table in Interbase, where each line-item is a "child record" of the Order record. We copy 
ALL of the details from the product database into line items, this way if a product price 
changes later, we still retain the details of your previous order.

> 
> Did you use DCWorkflow to let your members publish their products 
> without creating security problems in other member directories? Or do you
> have some sort of centralized moderation in place? 

For the ADKWood site, which *is* entirely based on Zope and CMF, the client does not 
need workflow because he doesn't want to approve all the changes 1000+ users will 
generate. Therefore I set the workflow for my three content-type objects to None 
(blank).

However the client will have a "show new images uploaded in xx days" report so he can 
quickly see if anything looks inappropriate.


Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com               AOL-IM: BKClements