Saving XX% corner banners are inaccurate

Description

Never noticed this before until we posted a product at £10 (inc. 20% VAT) which was reduced to £5 (inc. 20% VAT), which displayed a banner saying Saving 45%.

I have changed the percentage calculation and it is working now.

To fix;
Open /catalog/includes/modules/product_listing.php and /catalog/includes/modules/product_listing_col.php

Find;
$discount = (((($fullprice * 100) - ($saleprice * 100)) / ($fullprice * 100)) * 100);

Change to;
$discount = ($saleprice / $fullprice) * 100;

Environment

None

Steps to reproduce

None

Assignee

Giles Marshall

Reporter

Scott Murphy

Labels

None

Severity

Minor

Components

Fix versions

Affects versions

Priority

Configure