Author: duncan
Date: Thu Dec 21 21:37:41 2006
New Revision: 8764

Modified:
   branches/rel-1-6/freevo/src/plugins/shoppingcart.py

Log:
[ 1620425 ] Shopping cart can't handle subitems
Patch from Gorka Olaizola applied


Modified: branches/rel-1-6/freevo/src/plugins/shoppingcart.py
==============================================================================
--- branches/rel-1-6/freevo/src/plugins/shoppingcart.py (original)
+++ branches/rel-1-6/freevo/src/plugins/shoppingcart.py Thu Dec 21 21:37:41 2006
@@ -88,7 +88,12 @@
 
 
     def addToCart(self, arg=None, menuw=None):
-        self.cart.append(self.item)
+        if hasattr(self.item, 'subitems') and self.item.subitems:
+            for s in self.item.subitems:
+                self.cart.append(s)
+        else:
+            self.cart.append(self.item)
+
         if isinstance(menuw.menustack[-1].selected, menu.MenuItem):
             rc.post_event(em.MENU_BACK_ONE_MENU)
         else:

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to