From dc4d975f7acc20361329115f5a52833c0ffcae89 Mon Sep 17 00:00:00 2001 From: Ihor Sviziev Date: Thu, 9 Jul 2015 11:57:02 +0300 Subject: [PATCH] Product collection - Add url rewrite from different website --- app/code/Magento/Catalog/Model/Resource/Product/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php index 1d4a1ee8a13ab..9d7e106869535 100644 --- a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php @@ -1278,7 +1278,7 @@ protected function _addUrlRewrite() $select = $this->getConnection() ->select() ->from(['u' => $this->getTable('url_rewrite')], ['u.entity_id', 'u.request_path']) - ->where('u.store_id = ?', $this->_storeManager->getStore()->getId()) + ->where('u.store_id = ?', $this->_storeManager->getStore($this->getStoreId())->getId()) ->where('u.is_autogenerated = 1') ->where('u.entity_type = ?', ProductUrlRewriteGenerator::ENTITY_TYPE) ->where('u.entity_id IN(?)', $productIds);