django-oscar
django-oscar copied to clipboard
Bug AbsoluteDiscountBenefit
Hi, according with the description in the class AbstractBenefit in file src/oscar/apps/offer/abstract_models.py in line 480, for the absolute discount the discount's logic is : "Discount is a fixed amount off of the product's value".
In the file src/oscar/apps/offer/benefits.py instead the logic in the class AbsoluteDiscountBenefit is developed as if the discount were "Discount is a fixed amount off of the total amount of the shopping".
I assumed that the description "Discount is a fixed amount off of the product's value" is correct and i've change the AbsoluteDiscountBenefit's code so that it works as the description would like.
Thanks.
Hi, I think you better improve the description, because what you are doing now is change exsiting offers on sites that use this functionality. I think most customers would not enjoy it when suddenly their offers give a much larger discount then before after an update!
@specialunderwear yes I've thought that but the description of the offer is enough clear now, so i don't think that the customers use this offer now. But you are rigth. Anyway, now the description does not reflect the logic, so if you don't want change the logic I think that the description must be changed!
Yes, hence is suggest improving the description, if you need this kind of discount, you should introduce a new discount, so existing discounts are not changed. That would be great to have!
@samar-hassan I think you need to edit a migration because the make migration test failed now.
@samar-hassan please edit the existing migration, a new migration for choices is not needed!
Codecov Report
Merging #3954 (896c381) into master (2cc14b9) will not change coverage. The diff coverage is
n/a
.
:exclamation: Current head 896c381 differs from pull request most recent head 23cc1f9. Consider uploading reports for the commit 23cc1f9 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #3954 +/- ##
=======================================
Coverage 87.50% 87.50%
=======================================
Files 290 290
Lines 15912 15912
=======================================
Hits 13924 13924
Misses 1988 1988
Files Changed | Coverage Δ | |
---|---|---|
src/oscar/apps/offer/abstract_models.py | 89.00% <ø> (ø) |