On Fri, 25 May 2001, Bjorn Stabell wrote:

> session = context.session_mgr.getSessionData()
> 
> cart = session.get('shopping_cart', {})
> 
> sku = int(sku)
> 
> if not cart.has_key(sku):
>   cart[sku] = 0
> 
> if int(qty)>0: 
>    cart[sku] = cart[sku] + int(qty)


Could this be the same problem that I was experiencing, in that
dicts/btrees do not in themselves notify the persitence machinery that
they have changed? try adding cart._p_changed = 1 to the code after
modifying cart{}.

-Matt


-- 
Matt Hamilton                                         [EMAIL PROTECTED]
Netsight Internet Solutions, Ltd.          Business Vision on the Internet
http://www.netsight.co.uk                               +44 (0)117 9090901
Web Hosting | Web Design  | Domain Names  |  Co-location  | DB Integration



_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to