Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Fix for config variant stock 736 #747

Merged
merged 9 commits into from Jul 11, 2019
Merged

Fix for config variant stock 736 #747

merged 9 commits into from Jul 11, 2019

Conversation

minesh93
Copy link
Contributor

Description

This will show product variation if the configuration value of cataloginventory/options/show_out_of_stock is set to 1.

Out of stock items are then filtered out via Magento\CatalogInventory\Helper\Stock::addInStockFilterToCollection

Fixed Issues

  1. Configurable products with "out of stock" return as product: null #736 Configurable products with "out of stock" return as product: null

Manual testing scenarios (*)

Create a configurable product with one of the variants being out of stock. Test with both cataloginventory/options/show_out_of_stock being enabled and disabled.

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Jun 18, 2019

CLA assistant check
All committers have signed the CLA.

foreach ($this->parentProducts as $product) {
$attributeData = $this->getAttributesCodes($product);
/** @var ChildCollection $childCollection */
$childCollection = $this->childCollectionFactory->create();
$childCollection->setProductFilter($product);
$childCollection->addAttributeToSelect($attributeData);

if (!$showOutOfStock) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@lenaorobei lenaorobei requested a review from naydav June 27, 2019 21:42
@magento-engcom-team
Copy link
Contributor

Hi @naydav, thank you for the review.
ENGCOM-5372 has been created to process this Pull Request
✳️ @naydav, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@magento-engcom-team
Copy link
Contributor

@minesh93 thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@okorshenko okorshenko added this to Work in Progress in Pull Request Progress Jul 10, 2019
@m2-community-project m2-community-project bot moved this from Work in Progress to Reviewer Approved in Pull Request Progress Jul 10, 2019
@naydav naydav merged commit f69c8e8 into magento:2.3-develop Jul 11, 2019
@ghost
Copy link

ghost commented Jul 11, 2019

Hi @minesh93, 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.

naydav added a commit that referenced this pull request Jul 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants