@@ -611,7 +611,9 @@ public function getBindArgumentValue()
611
611
)->__toString ()
612
612
);
613
613
} elseif ($ this ->getAttribute () === 'sku ' ) {
614
- $ this ->isMultipleSku ();
614
+ $ value = $ this ->getData ('value ' );
615
+ $ value = preg_split ('#\s*[,;]\s*# ' , $ value , null , PREG_SPLIT_NO_EMPTY );
616
+ $ this ->setValueParsed ($ value );
615
617
}
616
618
617
619
return parent ::getBindArgumentValue ();
@@ -711,7 +713,7 @@ protected function _getAttributeSetId($productId)
711
713
public function getOperatorForValidate ()
712
714
{
713
715
$ operator = $ this ->getOperator ();
714
- if ($ this ->getInputType () == 'category ' || $ this -> isMultipleSku ( )) {
716
+ if (in_array ( $ this ->getInputType (), [ 'category ' , ' sku ' ] )) {
715
717
if ($ operator == '== ' ) {
716
718
$ operator = '{} ' ;
717
719
} elseif ($ operator == '!= ' ) {
@@ -760,31 +762,4 @@ private function removeTagsFromLabel(array $selectOptions)
760
762
761
763
return $ selectOptions ;
762
764
}
763
-
764
- /**
765
- * Check condition contains multiple sku.
766
- *
767
- * @return bool
768
- */
769
- private function isMultipleSku ()
770
- {
771
- $ result = false ;
772
- if ($ this ->getInputType () === 'sku ' ) {
773
- if ($ this ->hasValueParsed ()) {
774
- $ value = $ this ->getData ('value_parsed ' );
775
- if (count ($ value > 1 )) {
776
- $ result = true ;
777
- }
778
- } else {
779
- $ value = $ this ->getData ('value ' );
780
- $ value = preg_split ('#\s*[,;]\s*# ' , $ value , null , PREG_SPLIT_NO_EMPTY );
781
- if (count ($ value > 1 )) {
782
- $ this ->setValueParsed ($ value );
783
- $ result = true ;
784
- }
785
- }
786
- }
787
-
788
- return $ result ;
789
- }
790
765
}
0 commit comments