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