From f7205891ff192c3da61fc6bde652f23def6a030e Mon Sep 17 00:00:00 2001 From: helmutm Date: Sun, 27 Jul 2008 14:33:06 +0000 Subject: [PATCH] work in progress: commerce.product git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2774 fd906abe-77d9-0310-91a1-e0d9ade77398 --- commerce/browser/product.py | 2 +- commerce/interfaces.py | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/commerce/browser/product.py b/commerce/browser/product.py index 0dfe8f4..0e7a5e9 100644 --- a/commerce/browser/product.py +++ b/commerce/browser/product.py @@ -26,7 +26,7 @@ from zope import component from zope.cachedescriptors.property import Lazy -class ProcuctView(object): +class ProductView(object): def __init__(self, context, request): self.context = context diff --git a/commerce/interfaces.py b/commerce/interfaces.py index ed89b50..bb7ba78 100644 --- a/commerce/interfaces.py +++ b/commerce/interfaces.py @@ -41,7 +41,7 @@ class IShop(Interface): name = schema.ASCII( title=_(u'Shop name'), description=_(u'An internal name uniquely identifying the shop.'), - default=u'', + default='', required=True) title = schema.TextLine( title=_(u'Title'), @@ -52,9 +52,7 @@ class IShop(Interface): title=_(u'Description'), description=_(u'A medium-length description.'), default=u'', - missing_value=u'', required=False) - products = Attribute(u'The products available in this shop.') categories = Attribute(u'The product categories provided by this shop.') suppliers = Attribute(u'The suppliers providing products for ' @@ -71,7 +69,7 @@ class ISupplier(Interface): name = schema.ASCII( title=_(u'Supplier name'), description=_(u'An internal name uniquely identifying the supplier.'), - default=u'', + default='', required=True) title = schema.TextLine( title=_(u'Title'), @@ -96,11 +94,11 @@ class IProduct(Interface): """ A certain class of similar objects that may be put in a shopping cart. """ - productId = schema.ASCII( + productId = schema.ASCIILine( title=_(u'Product Identifier'), description=_(u'A name or number uniquely identifiying the ' u'product within a shop.'), - default=u'', + default='', required=True) title = schema.TextLine( title=_(u'Title'), @@ -113,6 +111,11 @@ class IProduct(Interface): default=u'', missing_value=u'', required=False) + fullDescription = schema.Text( + title=_(u'Full description'), + description=_(u'The full description of the object.'), + default=u'', + required=False) categories = Attribute(u'The product categories this product belongs to.') suppliers = Attribute(u'The suppliers (typically only one) providing ' @@ -152,7 +155,7 @@ class ICustomer(Interface): customerId = schema.ASCII( title=_(u'Customer Identifier'), description=_(u'A name or number uniquely identifiying the customer.'), - default=u'', + default='', required=True) client = Attribute(u'The (real) client object of the customer role.')