File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
app/code/Magento/Swatches Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,9 @@ public function getJsonSwatchConfig()
179
179
$ attributeDataArray
180
180
);
181
181
}
182
+ if (isset ($ attributeDataArray ['additional_data ' ])) {
183
+ $ config [$ attributeId ]['additional_data ' ] = $ attributeDataArray ['additional_data ' ];
184
+ }
182
185
}
183
186
184
187
return $ this ->jsonEncoder ->encode ($ config );
Original file line number Diff line number Diff line change @@ -785,7 +785,11 @@ define([
785
785
$widget . options . jsonConfig . optionPrices
786
786
] ) ;
787
787
788
- $widget . _loadMedia ( eventName ) ;
788
+ var checkAdditionalData = JSON . parse ( this . options . jsonSwatchConfig [ attributeId ] [ 'additional_data' ] ) ;
789
+
790
+ if ( 1 == checkAdditionalData [ 'update_product_preview_image' ] ) {
791
+ $widget . _loadMedia ( eventName ) ;
792
+ }
789
793
$input . trigger ( 'change' ) ;
790
794
} ,
791
795
You can’t perform that action at this time.
0 commit comments