Skip to content

Commit a6a900a

Browse files
author
Valeriy Nayda
committed
MAGETWO-50409: Changing order of configurable attributes is ignored on frontend
1 parent 833a053 commit a6a900a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/ConfigurableProduct/Model/ConfigurableAttributeData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getAttributesData(Product $product, array $options = [])
3030
if ($attributeOptionsData) {
3131
$productAttribute = $attribute->getProductAttribute();
3232
$attributeId = $productAttribute->getId();
33-
$attributes[$attributeId] = [
33+
$attributes['swatch_' . $attributeId] = [
3434
'id' => $attributeId,
3535
'code' => $productAttribute->getAttributeCode(),
3636
'label' => $productAttribute->getStoreLabel($product->getStoreId()),

app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
?>
1111
<?php $swatchData = $block->getSwatchData(); ?>
1212
<div class="swatch-attribute swatch-layered <?php /* @escapeNotVerified */ echo $swatchData['attribute_code'] ?>"
13-
attribute-code="<?php /* @escapeNotVerified */ echo $swatchData['attribute_code'] ?>" attribute-id="174">
13+
attribute-code="<?php /* @escapeNotVerified */ echo $swatchData['attribute_code'] ?>" attribute-id="<?php echo $swatchData['attribute_id'] ?>">
1414
<div class="swatch-attribute-options clearfix">
1515
<?php foreach ($swatchData['options'] as $option => $label): ?>
1616
<a href="<?php /* @escapeNotVerified */ echo $label['link'] ?>" class="swatch-option-link-layered">

0 commit comments

Comments
 (0)