File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
app/code/Magento/Catalog/Model Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -877,13 +877,17 @@ public function getAttributes($groupId = null, $skipSuper = false)
877
877
*/
878
878
public function beforeSave ()
879
879
{
880
- $ this ->setHasOptions (false );
881
- $ this ->setRequiredOptions (false );
880
+ if ($ this ->getData ('has_options ' ) === null ) {
881
+ $ this ->setHasOptions (false );
882
+ }
883
+ if ($ this ->getData ('required_options ' ) === null ) {
884
+ $ this ->setRequiredOptions (false );
885
+ }
882
886
883
887
$ this ->getTypeInstance ()->beforeSave ($ this );
884
888
885
- $ hasOptions = false ;
886
- $ hasRequiredOptions = false ;
889
+ $ hasOptions = $ this -> getData ( ' has_options ' ) === " 1 " ;
890
+ $ hasRequiredOptions = $ this -> getData ( ' required_options ' ) === " 1 " ;
887
891
888
892
/**
889
893
* $this->_canAffectOptions - set by type instance only
You can’t perform that action at this time.
0 commit comments