Skip to content

Commit

Permalink
Fix _addUrlRewrite() ignoring collection store scope. (#510)
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 authored and colinmollenhour committed Aug 21, 2020
1 parent 1b97c6f commit 875afe2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,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 875afe2

Please sign in to comment.