File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
app/code/Magento/ConfigurableProduct/Block/Product/View/Type Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -143,14 +143,14 @@ public function hasOptions()
143
143
public function getAllowProducts ()
144
144
{
145
145
if (!$ this ->hasAllowProducts ()) {
146
+ $ products = [];
146
147
$ skipSaleableCheck = $ this ->catalogProduct ->getSkipSaleableCheck ();
147
-
148
- if ($ skipSaleableCheck ) {
149
- $ products = $ this -> getProduct ()-> getTypeInstance ()-> getUsedProducts ( $ this -> getProduct (), null );
150
- } else {
151
- $ products = $ this -> getProduct ()-> getTypeInstance ()-> getSalableUsedProducts ( $ this -> getProduct (), null );
148
+ $ allProducts = $ this -> getProduct ()-> getTypeInstance ()-> getUsedProducts ( $ this -> getProduct (), null );
149
+ foreach ($ allProducts as $ product ) {
150
+ if ( $ product -> isSaleable () || $ skipSaleableCheck ) {
151
+ $ products [] = $ product ;
152
+ }
152
153
}
153
-
154
154
$ this ->setAllowProducts ($ products );
155
155
}
156
156
return $ this ->getData ('allow_products ' );
You can’t perform that action at this time.
0 commit comments