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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drupalfan211’s picture

I 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.

drupalfan211’s picture

Assigned: Unassigned » drupalfan211
Status: Active » Needs review

Sorry 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.

yannisc’s picture

thanks drupalfan211 for the patch!

We'll try it out and let you know.

sk33lz’s picture

Assigned: drupalfan211 » Unassigned

I 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!

nchar’s picture

Status: Needs review » Closed (fixed)

The bug is now fixed at the dev release.

twooten’s picture

Thanks drupalfan211, your patch fixed it for me.

Tim

twooten’s picture

Issue summary: View changes

typo in my numbers