diff --git a/batiskaf/templates/jinja2/includes/category_product_thumb.jinja b/batiskaf/templates/jinja2/includes/category_product_thumb.jinja index 3fe4542..1cee604 100644 --- a/batiskaf/templates/jinja2/includes/category_product_thumb.jinja +++ b/batiskaf/templates/jinja2/includes/category_product_thumb.jinja @@ -21,7 +21,7 @@ {{ product.min_price_variation().price }} ₸ {% endif %} - {{ product.min_price() }} ₸ + {{ product.min_price(request.user) }} ₸ {% if product.in_stock() %}
@@ -48,4 +48,4 @@
- \ No newline at end of file + diff --git a/store/models.py b/store/models.py index cd7386f..f8fb411 100644 --- a/store/models.py +++ b/store/models.py @@ -260,7 +260,7 @@ class ProductVariation(models.Model): def get_price(self, profile=None): #import pdb; pdb.set_trace() - if profile and profile.is_authenticated() and self.product.brand.slug in ['beuchat', 'scorpena']: + if profile and profile.is_authenticated() and self.product.brand.slug in ['beuchat', 'scorpena'] and profile.sale: return int(self.price - (self.price / Decimal(100) * Decimal(profile.sale))) else: if self.discount: