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 )
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Chris McDonough
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Chris McDonough
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Chris McDonough
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.... Chris Withers
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Chris McDonough
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Matt Hamilton
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Chris McDonough
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Chris McDonough
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.... Chris Withers
- RE: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Bjorn Stabell
- RE: Randomness (RE: [Zope-dev] CoreSessionTracking 0.... Matt Hamilton
- RE: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Bjorn Stabell
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Joachim Werner
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.8) Chris McDonough
- Re: Randomness (RE: [Zope-dev] CoreSessionTracking 0.... Joachim Werner
