Skip to content

Commit 3c3d612

Browse files
committed
MAGETWO-54682: Fast load of product options
- MAGETWO-55756: Porting to 2.1
1 parent feccbc6 commit 3c3d612

File tree

1 file changed

+6
-1
lines changed
  • app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Attribute

1 file changed

+6
-1
lines changed

app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Attribute/Collection.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,12 @@ protected function loadOptions()
263263
$productAttribute = $item->getProductAttribute();
264264

265265
$itemId = $item->getId();
266-
$options = $configurableResource->getAttributeOptions($productAttribute, $this->getProduct()->getId());
266+
$options = $configurableResource->getAttributeOptions(
267+
$productAttribute,
268+
$this->getProduct()->getData(
269+
$this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField()
270+
)
271+
);
267272
foreach ($options as $option) {
268273
$values[$itemId . ':' . $option['value_index']] = [
269274
'value_index' => $option['value_index'],

0 commit comments

Comments
 (0)