Closed olzen90 closed 7 years ago
The current getDiscountPercent function wrongly calculates the discount to a negative number.
getDiscountPercent
In Productbase.php, replace the getDiscountPercent function with this instead, and it works:
public function getDiscountPercent() { if($this->isOnSale()) { return round( (($this->getClerkRetailPrice()-$this->getClerkFinalPrice() ) / $this->getClerkRetailPrice())*100 ); } else { return 0; } }
The current
getDiscountPercent
function wrongly calculates the discount to a negative number.In Productbase.php, replace the
getDiscountPercent
function with this instead, and it works: