Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in adding the wishlist of "zero price" product. #16479

Closed
Sathishkumar8731 opened this issue Jul 2, 2018 · 19 comments
Closed

Issue in adding the wishlist of "zero price" product. #16479

Sathishkumar8731 opened this issue Jul 2, 2018 · 19 comments
Labels
Component: Catalog Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line good first issue Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@Sathishkumar8731
Copy link

Preconditions

  1. Magento CE 2.2.4 without sample data is installed.
  2. Added test product with zero price.

Steps to reproduce

  1. Login as a customer in front end of the website.
  2. Click on the wishlist button in the product.
  3. Now you can find the below error message.

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

Expected result

  1. It should allow to add the product in whishlist.

Actual result

  1. Instead its throwing error message about price type in the file path: Vendor/magento/module-catalog/Pricing/Price/ConfiguredOptions.php
@magento-engcom-team
Copy link
Contributor

Hi @Sathishkumar8731. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jul 2, 2018
@engcom-backlog-nickolas engcom-backlog-nickolas added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Component: Catalog Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Jul 2, 2018
@engcom-backlog-nickolas
Copy link

Hello @Sathishkumar8731, thank you for your report.
We've acknowledged the issue and added to our backlog.

@engcom-backlog-nickolas engcom-backlog-nickolas removed their assignment Jul 2, 2018
@osrecio osrecio self-assigned this Jul 2, 2018
@gelanivishal
Copy link
Contributor

@magento-engcom-team give me 2.2.0 instance.

@magento-engcom-team
Copy link
Contributor

Hi @gelanivishal. Thank you for your request. I'm working on Magento 2.2.0 instance for you

@magento-engcom-team
Copy link
Contributor

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.

@gelanivishal
Copy link
Contributor

gelanivishal commented Jul 2, 2018

@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.

@Sathishkumar8731
Copy link
Author

@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.

@gelanivishal
Copy link
Contributor

@magento-engcom-team give me 2.2.4 instance.

@magento-engcom-team
Copy link
Contributor

Hi @gelanivishal. Thank you for your request. I'm working on Magento 2.2.4 instance for you

@magento-engcom-team
Copy link
Contributor

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.

@gelanivishal
Copy link
Contributor

@Sathishkumar8731
I still didn't found an issue on v2.2.4. Please check it.

Thank you.

@engcom-backlog-nickolas
Copy link

engcom-backlog-nickolas commented Jul 2, 2018

@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.

@gelanivishal
Copy link
Contributor

Yes. I got it and will work on it.

@gelanivishal
Copy link
Contributor

@Sathishkumar8731 I have figured out the issue. Please create an instance in PR and check it.

Thank you.

@magento-engcom-team
Copy link
Contributor

Hi @Sathishkumar8731. Thank you for your report.
The issue has been fixed in #16537 by @gelanivishal in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jul 7, 2018
@ghost ghost added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jul 25, 2018
@magento-engcom-team
Copy link
Contributor

Hi @Sathishkumar8731. Thank you for your report.
The issue has been fixed in #17395 by @sreichel in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.7 release.

@chris-pook
Copy link
Contributor

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 #11699).

@chris-pook chris-pook reopened this Aug 22, 2018
@ishakhsuvarov
Copy link
Contributor

@chris-pook If I understood your problem correctly, creating a composer patch with the 0fc1574 commit should do the trick without any customizations.

@dhrumin44
Copy link

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line good first issue Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

8 participants