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 ''
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')