Skip to content

Commit 674df85

Browse files
committed
LYNX-227: Variants loading fix
1 parent b6169a6 commit 674df85

File tree

1 file changed

+5
-0
lines changed
  • app/code/Magento/ConfigurableProductGraphQl/Model/Variant

1 file changed

+5
-0
lines changed

app/code/Magento/ConfigurableProductGraphQl/Model/Variant/Collection.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,13 @@ private function fetch(ContextInterface $context, array $attributeCodes) : array
152152

153153
/** @var ChildCollection $childCollection */
154154
$childCollection = $this->childCollectionFactory->create();
155+
foreach ($this->parentProducts as $product) {
156+
$childCollection->setProductFilter($product);
157+
}
155158
$childCollection->addWebsiteFilter($context->getExtensionAttributes()->getStore()->getWebsiteId());
156159

160+
$attributeCodes = array_unique(array_merge($this->attributeCodes, $attributeCodes));
161+
157162
$this->collectionProcessor->process(
158163
$childCollection,
159164
$this->searchCriteriaBuilder->create(),

0 commit comments

Comments
 (0)