remotes/origin/mitri4
spacenergy 10 years ago
parent 7bf64f63df
commit 79dd67ec5f
  1. 4
      store/models.py

@ -260,8 +260,8 @@ 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()
from django.core.mail import mail_admins #from django.core.mail import mail_admins
mail_admins('auth', '{} {} {} {}'.format(profile, profile.is_authenticated(), self.product.brand.slug, profile.sale)) mail_admins('auth', '{} {}'.format(profile, self.product.brand.slug))
if profile and profile.is_authenticated() and self.product.brand.slug in ['beuchat', 'scorpena'] and profile.sale: 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:

Loading…
Cancel
Save