예제 #1
0
파일: views.py 프로젝트: intk/plonetheme.zm
 def isBuyable(self, item):
     """
     Check if an item is buyable with PloneGetPaid
     """
     if not GETPAID_EXISTS:
         return False
     else:
         return IBuyableMarker.providedBy(item)
예제 #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)
예제 #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