File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ protected function _getProductCollection()
122
122
}
123
123
}
124
124
$ this ->_productCollection = $ layer ->getProductCollection ();
125
+ $ this ->_productCollection ->addOptionsToResult ();
125
126
126
127
$ this ->prepareSortableFieldsByCategory ($ layer ->getCurrentCategory ());
127
128
Original file line number Diff line number Diff line change @@ -142,11 +142,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
142
142
*/
143
143
protected $ optionInstance ;
144
144
145
- /**
146
- * @var bool
147
- */
148
- protected $ optionsInitialized = false ;
149
-
150
145
/**
151
146
* @var array
152
147
*/
@@ -1901,6 +1896,7 @@ public function addOption(Product\Option $option)
1901
1896
{
1902
1897
$ options = (array )$ this ->getData ('options ' );
1903
1898
$ options [] = $ option ;
1899
+ $ option ->setProduct ($ this );
1904
1900
$ this ->setData ('options ' , $ options );
1905
1901
return $ this ;
1906
1902
}
You can’t perform that action at this time.
0 commit comments