main.CRITICAL: Exception: Deprecated Functionality: Implicit conversion from float 49.62 to int loses precision in vendor/magento/module-sales-rule/Model/Rule/Condition/Product/Subselect.php on line 214

You might have encountered this error in magento 2.4.8-p3(php 8.1+) when you are having any shopping cart rule which is applied automatically without coupon. To solve either you change the function from private function getBaseRowTotalForChildrenProduct(mixed $item, mixed $attr, int $total): mixed
to
private function getBaseRowTotalForChildrenProduct(mixed $item, mixed $attr, float $total): float

Or create a module to be a preference for the class Subselect.php and update the file with the updated function.
Once you do it the error goes away

Leave a Reply

Your email address will not be published. Required fields are marked *