Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I am testing a product priced at $45 which is worth $60. The discount is showing 74%, but it should be exactly 25%. Something is wrong with the logic for this output I believe.
$45 is close to 74% of $60 dollars, so I am not sure what is going on, but hopefully that helps you figure out the bug.
Excellent distribution!
Cheers,
Jason
Comment | File | Size | Author |
---|---|---|---|
#1 | Fixes a math error in the discount calculation for deals | 658 bytes | drupalfan211 |
Comments
Comment #1
drupalfan211 CreditAttribution: drupalfan211 commentedI found the same issue. Here is a patch that I created to fix the calculation. Please test it and report back if this works to everyone's satisfaction.
Comment #2
drupalfan211 CreditAttribution: drupalfan211 commentedSorry about the previous post. I am new to this and have not read up on how to properly maintain the issue queue. In any event, it would be great if folks could review the patch from my previous post.
Comment #3
yannisc CreditAttribution: yannisc commentedthanks drupalfan211 for the patch!
We'll try it out and let you know.
Comment #4
sk33lz CreditAttribution: sk33lz commentedI have applied the patch in #1 to my local installation and it has fixed the issue for me.
Drupalfan211, it's not your responsibility to maintain any issue queue for projects you don't maintain. The project maintainers usually handle that stuff. Feel free to continue posting patches in other issues queues like you did here though. The maintainers will be very appreciative in most cases, as seen here :)
Great work!
Comment #5
nchar CreditAttribution: nchar commentedThe bug is now fixed at the dev release.
Comment #6
twooten CreditAttribution: twooten commentedThanks drupalfan211, your patch fixed it for me.
Tim
Comment #6.0
twooten CreditAttribution: twooten commentedtypo in my numbers