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

Fix for #16069: Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes" #18776

Closed
wants to merge 1 commit into from

Conversation

vpodorozh
Copy link
Contributor

@vpodorozh vpodorozh commented Oct 24, 2018

Description (#16069)

Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes"

Fixed Issues

  1. Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes" #16069: Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes"

Preconditions

  1. Magento CE 2.2.2 with Sample Data
  2. PHP 7.0

Manual testing scenarios

  1. Create configurable product with view simples
  2. Make configurable and all simple products out of stock
  3. Set Display Out of Stock Products to "yes"

Expected result

Price for configurable product should be displayed

Actual result

Price is not displayed at all

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team magento-engcom-team added Partner: ISM eCompany Pull Request is created by partner ISM eCompany partners-contribution Pull Request is created by Magento Partner labels Oct 24, 2018
@magento-engcom-team
Copy link
Contributor

Hi @vpodorozh. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me $VERSION instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@vpodorozh
Copy link
Contributor Author

@magento-engcom-team give me test instance

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

Hi @vpodorozh, here is your new Magento instance.
Admin access: http://ec2-34-228-235-121.compute-1.amazonaws.com/pr-18776//admin
Login: admin Password: 123123q

@vpodorozh vpodorozh requested a review from sergiosemov October 24, 2018 14:47
@orlangur orlangur self-assigned this Nov 7, 2018
@orlangur orlangur changed the title [Forwardport] Fix for #16069: Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes" Fix for #16069: Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes" Nov 7, 2018
@vpodorozh
Copy link
Contributor Author

@orlangur, Any update on it guys?

Copy link
Member

@davidverholen davidverholen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @vpodorozh,

I found some changes that would break backwards compatibility. You can read more about it here:
https://devdocs.magento.com/guides/v2.3/contributor-guide/backward-compatible-development/index.html

@vpodorozh
Copy link
Contributor Author

Do not close this PR please - I'm working on it now.
Sorry for late :)

…ldren are out of stock and even if Display Out of Stock Products is set to "yes"

- allow "out of stock" items to be used for price determination of configurable product ONLY in case all child products are "out of stock".

(cherry picked from commit 80f6a36)

magento#16069: Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes"
- add strict types.

(cherry picked from commit b786871)

magento#16069: Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes"
- refactor variable names.

(cherry picked from commit d009296)

magento#16069: Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes"
- add blank space.

(cherry picked from commit 0b19e04)

magento#16069: Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes"

- remove unneeded usage of the variable.

(cherry picked from commit 207e2e1)

magento#16069: Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes"

(cherry picked from commit f4ec67e)

magento#16069: Configurable product price is not displayed if all children are out of stock
- change request

magento#16069: Configurable product price is not displayed if all children are out of stock
- change request

magento#16069: Configurable product price is not displayed if all children are out of stock
- change request

magento#16069: Configurable product price is not displayed if all children are out of stock
- change request
@vpodorozh
Copy link
Contributor Author

@davidverholen - seems to be finished now. However JS tests suite has been failed - but I did not change any JS or locators, strange.

@swnsma swnsma requested a review from orlangur April 1, 2019 10:19
@VincentMarmiesse
Copy link
Contributor

Hi,

Any news on this PR?

@ghost ghost assigned davidverholen May 24, 2019
@davidverholen davidverholen self-requested a review May 24, 2019 06:55
@magento-engcom-team
Copy link
Contributor

Hi @davidverholen, thank you for the review.
ENGCOM-5152 has been created to process this Pull Request

@VasylShvorak VasylShvorak self-assigned this May 24, 2019
@VasylShvorak
Copy link
Contributor

✔️ QA passed

@Nazar65 Nazar65 self-assigned this May 24, 2019
@davidverholen davidverholen removed their request for review May 24, 2019 15:53
@vpodorozh
Copy link
Contributor Author

a w e s o m e

@Nazar65
Copy link
Member

Nazar65 commented May 27, 2019

HI @vpodorozh thank you for collaboration, we have some test fail, like this ->
Current file(s) contain protected modifier for method or property. (phpProtectedModifier) Magento/ConfigurableProduct/Pricing/Render/FinalPriceBox.php
Can we just override this behavior to _tohtml() method ? and avoid protected methods ?

Copy link
Member

@sivaschenko sivaschenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @vpodorozh thanks for the pull requests, please see my review comments

/**
* @inheritdoc
*/
protected function isApplySalableCheck(SaleableInterface $salableItem): bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new protected method is a backward incompatible change, that cannot be delivered to patch release. What do you think about overriding the _toHtml method instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest I do not remember why I have introduce this method :)
Will take a look on it on the next week (I’m on vacation now)
Thank you!

@sivaschenko
Copy link
Member

Hi @vpodorozh do you have any updates on this pull request?

@sivaschenko
Copy link
Member

@magento run all tests

@vpodorozh
Copy link
Contributor Author

Nope. And will not be in near time. Sorry!

@vpodorozh vpodorozh closed this Jul 14, 2019
@m2-assistant
Copy link

m2-assistant bot commented Jul 14, 2019

Hi @vpodorozh, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants