6

When I am inserting product to the cart then below error is occured.

Fatal error: Uncaught Error: Call to undefined function Magento\InventorySales\Model\IsProductSalableForRequestedQtyCondition\bccomp() in /home/public_html/vendor/magento/module-inventory-sales/Model/IsProductSalableForRequestedQtyCondition/IsSalableWithReservationsCondition.php:93 Stack trace: #0 /home/public_html/vendor/magento/module-inventory-sales/Model/IsProductSalableForRequestedQtyCondition/IsProductSalableForRequestedQtyConditionChain.php(222): Magento\InventorySales\Model\IsProductSalableForRequestedQtyCondition\IsSalableWithReservationsCondition->execute('B007D38J3M', 1, 1) #1 /home/public_html/vendor/magento/module-inventory-sales/Model/IsProductSalableForRequestedQtyCondition/IsProductSalableForRequestedQtyConditionChain.php(162): Magento\InventorySales\Model\IsProductSalableForRequestedQtyCondition\IsProductSalableForRequestedQtyConditionChain->processSufficientConditions('B007D38J3M', 1, 1) #2 /home/public_html/vendor/magento/module-inventory-s in /home/public_html/vendor/magento/module-inventory-sales/Model/IsProductSalableForRequestedQtyCondition/IsSalableWithReservationsCondition.php on line 93

How to solve this ?

Thanks in Advanced.

1 Answer 1

24

bccomp() function belongs to BCMath package; if it's undefined, then possible this library not installed or it's not enabled for your PHP version. Like for php7.2 need to install for ubuntu distribution:

sudo apt install php7.2-bcmath
1
  • 1
    thank it is worked for me Sep 25, 2019 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.