예제 #1
0
파일: product.py 프로젝트: hforge/shop
 def get_price_prefix(self):
     shop = get_shop(self)
     context = get_context()
     group_name = get_group_name(shop, context)
     if get_uri_name(group_name) == 'pro':
         return 'pro-'
     return ''
예제 #2
0
 def get_price_prefix(self):
     shop = get_shop(self)
     context = get_context()
     group_name = get_group_name(shop, context)
     if get_uri_name(group_name) == 'pro':
         return 'pro-'
     return ''
예제 #3
0
파일: product.py 프로젝트: hforge/shop
 def is_buyable(self, context, quantity=1):
     shop = get_shop(self)
     group_name = get_group_name(shop, context)
     return (self.get_price_without_tax() != decimal(0) and
             group_name not in self.get_property('not_buyable_by_groups') and
             self.get_statename() == 'public')
예제 #4
0
 def is_buyable(self, context, quantity=1):
     shop = get_shop(self)
     group_name = get_group_name(shop, context)
     return (self.get_price_without_tax() != decimal(0) and group_name
             not in self.get_property('not_buyable_by_groups')
             and self.get_statename() == 'public')