minor improvements on order and order item handling
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3125 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
c3d47fd093
commit
9d1b3bbc84
4 changed files with 5 additions and 3 deletions
|
@ -99,7 +99,7 @@ The items in a shopping cart may be included in an order.
|
|||
>>> for item in orderItems.getCart(c001):
|
||||
... item.setOrder(ord001)
|
||||
|
||||
Now the default cart is empty; we now have to supply the order for
|
||||
Now the default cart is empty; we have to supply the order for
|
||||
retrieving the order items.
|
||||
|
||||
>>> orderItems.getCart(c001)
|
||||
|
|
|
@ -8,4 +8,6 @@
|
|||
|
||||
<i18n:registerTranslations directory="locales" />
|
||||
|
||||
<zope:adapter factory="cybertools.commerce.order.OrderItems" />
|
||||
|
||||
</configure>
|
||||
|
|
|
@ -371,6 +371,6 @@ class IOrderItems(Interface):
|
|||
may be specified via keyword arguments.
|
||||
"""
|
||||
|
||||
def getCart(party, order='???', shop=None, run=0, **kw):
|
||||
def getCart(party=None, order='???', shop=None, run=0, **kw):
|
||||
""" Return a collection of order items.
|
||||
"""
|
||||
|
|
|
@ -116,7 +116,7 @@ class OrderItems(object):
|
|||
self.context.indexTrack(0, track, 'order')
|
||||
return track
|
||||
|
||||
def getCart(self, party, order='???', shop=None, run=None, **kw):
|
||||
def getCart(self, party=None, order='???', shop=None, run=None, **kw):
|
||||
if run:
|
||||
kw['run'] = run
|
||||
result = self.query(party=party, order=order, **kw)
|
||||
|
|
Loading…
Add table
Reference in a new issue