remotes/origin/mitri4
spacenergy 10 years ago
parent c87e612e26
commit cdb39ea527
  1. 2
      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 }} <small class="text-danger"><s>{{ product.min_price_variation().price }}
₸</s></small> ₸</s></small>
{% endif %} {% endif %}
{{ product.min_price() }} ₸ {{ product.min_price(request.user) }} ₸
</div> </div>
{% if product.in_stock() %} {% if product.in_stock() %}
<div class="state-yes"> <div class="state-yes">

@ -260,7 +260,7 @@ class ProductVariation(models.Model):
def get_price(self, profile=None): def get_price(self, profile=None):
#import pdb; pdb.set_trace() #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))) return int(self.price - (self.price / Decimal(100) * Decimal(profile.sale)))
else: else:
if self.discount: if self.discount:

Loading…
Cancel
Save