cybertools/commerce
helmutm 1ff28acd31 work in progress: shops and products
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2798 fd906abe-77d9-0310-91a1-e0d9ade77398
2008-08-10 09:14:19 +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 work in progress: shops and products 2008-08-10 09:14:19 +00:00
configure.zcml provide German translations for cybertools.commerce; reduce interfaces to generic fields only 2008-08-09 12:55:54 +00:00
interfaces.py work in progress: shops and products 2008-08-10 09:14:19 +00:00
product.py work in progress: shops and products 2008-08-10 09:14:19 +00:00
README.txt work in progress: shops and products 2008-08-10 09:14:19 +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.addProduct(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
=========


Orders
======