in Model/Product/Feed/ProductRetriever/Configurable.php [52:90]
public function retrieve($offset = 1, $limit = self::LIMIT): array
{
$storeId = $this->fbeHelper->getStore()->getId();
$configurableCollection = $this->productCollectionFactory->create();
$configurableCollection->addAttributeToSelect('*')
->addAttributeToFilter('status', Status::STATUS_ENABLED)
->addAttributeToFilter('visibility', ['neq' => Visibility::VISIBILITY_NOT_VISIBLE])
->addAttributeToFilter('type_id', $this->getProductType())
->setStoreId($storeId);
$configurableCollection->getSelect()->limit($limit, $offset);
$simpleProducts = [];
foreach ($configurableCollection as $product) {
/** @var Product $product */
/** @var ConfigurableType $configurableType */
$configurableType = $product->getTypeInstance();
$configurableAttributes = $configurableType->getConfigurableAttributes($product);
foreach ($configurableType->getUsedProducts($product) as $childProduct) {
/** @var Product $childProduct */
$configurableSettings = ['item_group_id' => $product->getId()];
foreach ($configurableAttributes as $attribute) {
$productAttribute = $attribute->getProductAttribute();
$attributeCode = $productAttribute->getAttributeCode();
$attributeValue = $childProduct->getData($productAttribute->getAttributeCode());
$attributeLabel = $productAttribute->getSource()->getOptionText($attributeValue);
$configurableSettings[$attributeCode] = $attributeLabel;
}
$childProduct->setConfigurableSettings($configurableSettings);
$childProduct->setParentProductUrl($product->getProductUrl());
$simpleProducts[] = $childProduct;
}
}
return $simpleProducts;
}