@@ -829,7 +829,14 @@ private function addNullValue($customData, $subProducts, $attribute, AttributeRe
829
829
$ valueText = $ subProduct ->getAttributeText ($ attributeName );
830
830
831
831
$ values = array_merge ($ values , $ this ->getValues ($ valueText , $ subProduct , $ attributeResource ));
832
- $ subProductImages = $ this ->addSubProductImage ($ subProductImages , $ attribute , $ subProduct , $ valueText );
832
+ if ($ this ->configHelper ->useAdaptiveImage ($ attributeResource ->getStoreId ())) {
833
+ $ subProductImages = $ this ->addSubProductImage (
834
+ $ subProductImages ,
835
+ $ attribute ,
836
+ $ subProduct ,
837
+ $ valueText
838
+ );
839
+ }
833
840
}
834
841
}
835
842
@@ -869,18 +876,18 @@ private function addSubProductImage($subProductImages, $attribute, $subProduct,
869
876
return $ subProductImages ;
870
877
}
871
878
872
- $ subImage = $ subProduct ->getData ($ this ->configHelper ->getImageType ());
873
- if (!$ subImage || $ subImage === 'no_selection ' ) {
874
- return $ subProductImages ;
875
- }
876
-
877
879
$ image = $ this ->imageHelper
878
880
->init ($ subProduct , $ this ->configHelper ->getImageType ())
879
881
->resize (
880
882
$ this ->configHelper ->getImageWidth (),
881
883
$ this ->configHelper ->getImageHeight ()
882
884
);
883
885
886
+ $ subImage = $ subProduct ->getData ($ image ->getType ());
887
+ if (!$ subImage || $ subImage === 'no_selection ' ) {
888
+ return $ subProductImages ;
889
+ }
890
+
884
891
try {
885
892
$ textValueInLower = mb_strtolower ($ valueText , 'utf-8 ' );
886
893
$ subProductImages [$ textValueInLower ] = $ image ->getUrl ();
0 commit comments