Skip to content

Commit 7a5b788

Browse files
committed
6505 Show products which are out of stock depending on the configuration for category pages
1 parent 6fa0683 commit 7a5b788

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/app/code/community/IntegerNet/Solr/Helper/Factory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ public function getSolrRequest($requestMode = self::REQUEST_MODE_AUTODETECT)
101101
$this->getSolrResource(),
102102
$storeId);
103103
} elseif ($isCategoryPage) {
104+
$applicationContext
105+
->setCategoryConfig($this->getCurrentStoreConfig()->getCategoryConfig());
104106
$factory = new CategoryRequestFactory(
105107
$applicationContext,
106108
$this->getSolrResource(),

src/app/code/community/IntegerNet/Solr/Model/Config/Store.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ public function getCategoryConfig()
265265
$this->_getConfigFlag($prefix . 'use_in_search_results'),
266266
intval($this->_getConfig($prefix . 'max_number_results')),
267267
$this->_getConfigFlag($prefix . 'fuzzy_is_active'),
268-
floatval($this->_getConfig($prefix . 'fuzzy_sensitivity'))
268+
floatval($this->_getConfig($prefix . 'fuzzy_sensitivity')),
269+
$this->_getConfig($prefix . 'show_outofstock')
269270
);
270271
}
271272
return $this->_category;

src/app/code/community/IntegerNet/Solr/sql/integernet_solr_setup/upgrade-1.7.3-1.7.4.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
$installer->setConfigData('integernet_solr/results/show_outofstock', Mage::getStoreConfig('cataloginventory/options/show_out_of_stock'));
1717
$installer->setConfigData('integernet_solr/autosuggest/show_outofstock', Mage::getStoreConfig('cataloginventory/options/show_out_of_stock'));
18+
$installer->setConfigData('integernet_solr/category/show_outofstock', Mage::getStoreConfig('cataloginventory/options/show_out_of_stock'));
1819

1920
Mage::getModel('index/process')
2021
->load('integernet_solr', 'indexer_code')

0 commit comments

Comments
 (0)