Closed koertho closed 9 months ago
as discussed, it should return an empty string if there is no price on the product.
Returning an empty string would only be possible for getTotalOriginalPrice()
, the other methods are used follow-up price calculation methods. Switching to empty string lead to following exception:
Therefore, since these three methods are price calculation methods, they also should IMHO return a price, even if the product itself has no price.
I have applied another fix in fda57f603b5eabcf989f07cf334d8c9269fd9387
This PR fix the "Unsupported operand types" exception that appears if an product is added to cart (or cart is viewed) when the product has not price attribute.
This PR adds just a float cast to the price calculation methods in
ProductCollectionItem
, so the price calculation methods always return a price :)