1

I have installed the Magento 2.2.4 and market place theme pioneer. I have tried to add to wishlist the product but I am getting below error.

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Pricing\Price\ConfiguredOptions::getItemOptionsValue() must be of the type float, boolean given, called in /var/www/html/gomm/vendor/magento/module-catalog/Pricing/Price/ConfiguredRegularPrice.php on line 74 and defined in /var/www/html/gomm/vendor/magento/module-catalog/Pricing/Price/ConfiguredOptions.php:24 Stack trace: #0 /var/www/html/gomm/vendor/magento/module-catalog/Pricing/Price/ConfiguredRegularPrice.php(74): Magento\Catalog\Pricing\Price\ConfiguredOptions->getItemOptionsValue(false, Object(Magento\Wishlist\Model\Item)) #1 /var/www/html/gomm/vendor/magento/module-catalog/Pricing/Price/BasePrice.php(32): Magento\Catalog\Pricing\Price\ConfiguredRegularPrice->getValue() #2 /var/www/html/gomm/vendor/magento/module-catalog/Pricing/Price/FinalPrice.php(44): Magento\Catalog\Pricing\Price\BasePrice->getValue() #3 /var/www/html/gomm/vendor/magento/module-catalog/Pricing/Price/ConfiguredPrice.php(101): Magento\Catalog\Pricing\Price\FinalPrice in /var/www/html/gomm/vendor/magento/module-catalog/Pricing/Price/ConfiguredOptions.php on line 24

1
  • Hi Jack, Please check the product price which you are adding in wishlist. Because by default Magento does not allow the zero product (0.00). Commented Jul 2, 2018 at 9:56

3 Answers 3

3

The error is caused due to the product price is zero.

Since in default Magento while adding the wishlist the product price type is return as "float".

Refer the coding line: 24 in below file path

vendor/magento/module-catalog/Pricing/Price/ConfiguredOptions.php

Can you change the product price and then check it.

0

Remove generation/code

Run command:

bin/magento cache:flush

bin/magento setup:di:compile

Hope it will work.

1
  • I have tried but didn't work.
    – Jack
    Commented Jun 27, 2018 at 12:01
0

It is the bug https://github.com/magento/magento2/issues/16479 You can choose one of options:

  1. Remove zero price product from wishlist
  2. Update Magento to v2.3.0 or upper
  3. Install patch, if you install Magento within composer you have to patch with 0fc1574 commit using this manual for patch installing

    Link: https://github.com/magento/magento2/issues/16479#issuecomment-421576285

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.