Example #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)
Example #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)
 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