Skip to content

Commit

Permalink
[bug-OpenMage#510] _addUrlRewrite() ignoring collection store scope
Browse files Browse the repository at this point in the history
While Mage_Catalog_Model_Resource_Product_Collection::addUrlRewrite()
does respect any set storeId on the collection it's helper that does
the actual work is hard-coded to the current active store.
  • Loading branch information
edannenberg committed Aug 24, 2020
1 parent 0dfa2c4 commit 99199b5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ protected function _addUrlRewrite()
}

$select = $this->_factory->getProductUrlRewriteHelper()
->getTableSelect($productIds, $this->_urlRewriteCategory, Mage::app()->getStore()->getId());
->getTableSelect($productIds, $this->_urlRewriteCategory, Mage::app()->getStore($this->getStoreId())->getId());

$urlRewrites = array();
foreach ($this->getConnection()->fetchAll($select) as $row) {
Expand Down

0 comments on commit 99199b5

Please sign in to comment.