cybertools/commerce
helmutm 2d16e7766a fix field definition
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2813 fd906abe-77d9-0310-91a1-e0d9ade77398
2008-08-14 12:24:03 +00:00
..
browser work in progress: commerce.product 2008-07-27 14:33:06 +00:00
locales work in progress: shops and products 2008-08-10 09:14:19 +00:00
__init__.py create cybertools.commerce package 2008-07-12 14:00:12 +00:00
base.py provide basic customer implementation 2008-08-13 17:35:06 +00:00
common.py provide basic customer implementation 2008-08-13 17:35:06 +00:00
configure.zcml fix field definition 2008-08-14 12:21:11 +00:00
customer.py provide basic customer implementation 2008-08-13 17:35:06 +00:00
interfaces.py fix field definition 2008-08-14 12:24:03 +00:00
product.py provide basic customer implementation 2008-08-13 17:35:06 +00:00
README.txt provide basic customer implementation 2008-08-13 17:35:06 +00:00
tests.py work in progress: shops and products 2008-08-10 09:14:19 +00:00

=================================================
Commerce: Shope, Products, Customers, Orders, ...
=================================================

  ($Id$)


Shops and Products
==================

Let's start with a Shop:

  >>> from cybertools.commerce.base import Shop
  >>> shop1 = Shop(u'shop1', u'PC up Ltd')

Now we add products to the shop.

  >>> from cybertools.commerce.product import Product
  >>> p001 = Product(u'p001', u'Silent Case')

  >>> shop1.products.add(p001)

  >>> sorted((name, p.title) for name, p in shop1.products.items())
  [(u'p001', u'Silent Case')]

Let's have a look at the product - it should correctly reference the shop
it belongs to.

  >>> len(p001.shops)
  1
  >>> p001.shops.keys()[0]
  u'shop1'


Customers
=========

  >>> from cybertools.commerce.customer import Customer
  >>> c001 = Customer(u'c001', u'Your Local Store')


Orders
======