Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Pricing\Price\ConfiguredOptions::getItemOptionsValue() must be of the type float, boolean given, called in /opt/lampp/htdocs/SVEP4087/vendor/magento/module-catalog/Pricing/Price/ConfiguredRegularPrice.php on line 74 and defined in /opt/lampp/htdocs/SVEP4087/vendor/magento/module-catalog/Pricing/Price/ConfiguredOptions.php:24 Stack trace: #0 /opt/lampp/htdocs/SVEP4087/vendor/magento/module-catalog/Pricing/Price/ConfiguredRegularPrice.php(74): Magento\Catalog\Pricing\Price\ConfiguredOptions->getItemOptionsValue(false, Object(Magento\Wishlist\Model\Item)) #1 /opt/lampp/htdocs/SVEP4087/vendor/magento/module-catalog/Pricing/Price/BasePrice.php(32): Magento\Catalog\Pricing\Price\ConfiguredRegularPrice->getValue() #2 /opt/lampp/htdocs/SVEP4087/vendor/magento/module-catalog/Pricing/Price/FinalPrice.php(44): Magento\Catalog\Pricing\Price\BasePrice->getValue() #3 /opt/lampp/htdocs/SVEP4087/vendor/magento/module-catalog/Pricing/Price/ConfiguredPrice.php(101): Mage in /opt/lampp/htdocs/SVEP4087/vendor/magento/module-catalog/Pricing/Price/ConfiguredOptions.php on line 24
1) Instead its throwing error message about price type in the file path: Vendor/magento/module-catalog/Pricing/Price/ConfiguredOptions.php
Hi @Sathishkumar8731. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento-engcom-team give me {$VERSION} instance
where {$VERSION} is version tags (starting from 2.2.0+) or develop branches (2.2-develop +).
For more details, please, review the Magento Contributor Assistant documentation.
@Sathishkumar8731 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hello @Sathishkumar8731, thank you for your report.
We've acknowledged the issue and added to our backlog.
@magento-engcom-team give me 2.2.0 instance.
Hi @gelanivishal. Thank you for your request. I'm working on Magento 2.2.0 instance for you
Hi @gelanivishal, here is your Magento instance.
Admin access: https://i-16479-2-2-0.engcom.dev.magento.com/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.
@Sathishkumar8731
Hi
I have followed mentioned steps in issue on above instance but I didn't face any type of error. Can you please try at once?
Thank you.
@gelanivishal
Hi,
I have checked the issue and its seems to be working in above instance. The instance is Magento 2.2.0 version. Whereas I am facing the issue in Magento 2.2.4". Can you check in particular version and let me know.
Thank you.
@magento-engcom-team give me 2.2.4 instance.
Hi @gelanivishal. Thank you for your request. I'm working on Magento 2.2.4 instance for you
Hi @gelanivishal, here is your Magento instance.
Admin access: https://i-16479-2-2-4.engcom.dev.magento.com/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.
@Sathishkumar8731
I still didn't found an issue on v2.2.4. Please check it.
Thank you.
@gelanivishal, please make sure test product has price = '0'. I've corrected product data on https://i-16479-2-2-4.engcom.dev.magento.com/. You may try to reproduce this issue again with updated product.
Yes. I got it and will work on it.
@Sathishkumar8731 I have figured out the issue. Please create an instance in PR and check it.
Thank you.
Hi @Sathishkumar8731. Thank you for your report.
The issue has been fixed in magento/magento2#16537 by @gelanivishal in 2.3-develop branch
Related commit(s):
The fix will be available with the upcoming 2.3.0 release.
Hi @Sathishkumar8731. Thank you for your report.
The issue has been fixed in magento/magento2#17395 by @sreichel in 2.2-develop branch
Related commit(s):
The fix will be available with the upcoming 2.2.7 release.
Is there any suggestion of how to fix this in a site running < 2.2.7 ?
A plugin approach does not work due to the parent::getValue() method call elsewhere which means custom code won't kick in (as per https://github.com/magento/magento2/issues/11699).
@chris-pook If I understood your problem correctly, creating a composer patch with the https://github.com/magento/magento2/commit/0fc15747f05571cd6b164c01e1f1b6168e37a468 commit should do the trick without any customizations.
Hello @Sathishkumar8731 Same issue accrued in magento 2.2.4 and for zero price downloadable product and it's come from the ConfiguredRegularPrice.php file , and i just made change bellow in getValue()
public function getValue()
{
$basePrice = parent::getValue();
$basePrice = (float)$basePrice;
return $this->item
? $basePrice + $this->configuredOptions->getItemOptionsValue($basePrice, $this->item)
: $basePrice;
}