Skip to content

Commit 7adea3a

Browse files
MC-38050: Price Sorting Is not working
1 parent 6bc8dc4 commit 7adea3a

File tree

1 file changed

+8
-0
lines changed
  • app/code/Magento/Bundle/Model/ResourceModel/Indexer

1 file changed

+8
-0
lines changed

app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Magento\Customer\Model\Indexer\CustomerGroupDimensionProvider;
1818
use Magento\Store\Model\Indexer\WebsiteDimensionProvider;
1919
use Magento\Catalog\Model\Product\Attribute\Source\Status;
20+
use Magento\CatalogInventory\Model\Stock;
2021

2122
/**
2223
* Bundle products Price indexer resource model
@@ -624,6 +625,13 @@ private function calculateDynamicBundleSelectionPrice($dimensions)
624625
'tier_price' => $tierExpr,
625626
]
626627
);
628+
$select->join(
629+
['si' => $this->getTable('cataloginventory_stock_status')],
630+
'si.product_id = bs.product_id',
631+
[]
632+
);
633+
$select->where('si.stock_status = ?', Stock::STOCK_IN_STOCK);
634+
627635
$this->tableMaintainer->insertFromSelect($select, $this->getBundleSelectionTable(), []);
628636
}
629637

0 commit comments

Comments
 (0)