File tree 2 files changed +4
-4
lines changed
app/code/Magento/Swatches 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -462,6 +462,7 @@ protected function getHtmlOutput()
462
462
463
463
/**
464
464
* @return string
465
+ * @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
465
466
*/
466
467
public function getMediaCallback ()
467
468
{
Original file line number Diff line number Diff line change @@ -745,7 +745,8 @@ define([
745
745
$wrapper = $this . parents ( '.' + $widget . options . classes . attributeOptionsWrapper ) ,
746
746
$label = $parent . find ( '.' + $widget . options . classes . attributeSelectedOptionLabelClass ) ,
747
747
attributeId = $parent . attr ( 'attribute-id' ) ,
748
- $input = $parent . find ( '.' + $widget . options . classes . attributeInput ) ;
748
+ $input = $parent . find ( '.' + $widget . options . classes . attributeInput ) ,
749
+ checkAdditionalData = JSON . parse ( this . options . jsonSwatchConfig [ attributeId ] [ 'additional_data' ] ) ;
749
750
750
751
if ( $widget . inProductList ) {
751
752
$input = $widget . productForm . find (
@@ -785,9 +786,7 @@ define([
785
786
$widget . options . jsonConfig . optionPrices
786
787
] ) ;
787
788
788
- var checkAdditionalData = JSON . parse ( this . options . jsonSwatchConfig [ attributeId ] [ 'additional_data' ] ) ;
789
-
790
- if ( 1 == checkAdditionalData [ 'update_product_preview_image' ] ) {
789
+ if ( checkAdditionalData [ 'update_product_preview_image' ] === '1' ) {
791
790
$widget . _loadMedia ( eventName ) ;
792
791
}
793
792
$input . trigger ( 'change' ) ;
You can’t perform that action at this time.
0 commit comments