remotes/origin/mitri4
spacenergy 10 years ago
parent c87e612e26
commit cdb39ea527
  1. 4
      batiskaf/templates/jinja2/includes/category_product_thumb.jinja
  2. 2
      store/models.py

@ -21,7 +21,7 @@
<small class="text-danger"><s>{{ product.min_price_variation().price }}
₸</s></small>
{% endif %}
{{ product.min_price() }} ₸
{{ product.min_price(request.user) }} ₸
</div>
{% if product.in_stock() %}
<div class="state-yes">
@ -48,4 +48,4 @@
</div>
</div>
</div>
</div>
</div>

@ -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:

Loading…
Cancel
Save