Ejemplo n.º 1
0
 def isBuyable(self, item):
     """
     Check if an item is buyable with PloneGetPaid
     """
     if not GETPAID_EXISTS:
         return False
     else:
         return IBuyableMarker.providedBy(item)
Ejemplo n.º 2
0
 def isBuyable(self, item):
     """
     Check if an item is buyable with PloneGetPaid
     """
     if not GETPAID_EXISTS:
         return False
     else:
         return IBuyableMarker.providedBy(item)
Ejemplo n.º 3
0
 def getBoutiqueItems(self):
     """
     return the boutique items
     """
     cat = getToolByName(self.context, 'portal_catalog')
     results = cat.searchResults(portal_type='BoutiqueItem',
                                 review_state='published')
     boutiqueItems = []
     for brain in results:
         item = brain.getObject()
         if IBuyableMarker.providedBy(item):
             boutiqueItems.append(item)
     return boutiqueItems