diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-03 12:03:55 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-03 12:03:55 +0700 |
| commit | 49c16dcc5209642b7d5aa44eeefb859224e70964 (patch) | |
| tree | c1c32aa8fa73463812b25f698aa293e46ce37e3d /indoteknik_api | |
| parent | 972a7b1e6a4d0ec33f183b7a194f1592fb3c3031 (diff) | |
Update default price discount to price on calc web price
Diffstat (limited to 'indoteknik_api')
| -rw-r--r-- | indoteknik_api/models/product_product.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py index b49c419c..559ad35c 100644 --- a/indoteknik_api/models/product_product.py +++ b/indoteknik_api/models/product_product.py @@ -79,10 +79,11 @@ class ProductProduct(models.Model): price_discount = flashsale_price discount_percentage = flashsale_discount + price = self._get_website_price_exclude_tax() return { - 'price': self._get_website_price_exclude_tax(), + 'price': price, 'discount_percentage': discount_percentage, - 'price_discount': price_discount + 'price_discount': price_discount if price_discount > 0 else price } def api_manufacture(self, product_template): |
