We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class Mage_Rating_Model_Resource_Rating_Collection has method addStoresToCollection, that has code like this:
if (!$this->_isCollectionLoaded) { return $this; }
I think it need be refactored like in Mage_Review_Model_Resource_Review_Collection::addStoreData:
public function addStoreData() { $this->_addStoreDataFlag = true; return $this; }
and Mage_Review_Model_Resource_Review_Collection::_addStoreDataFlag:
protected function _addStoreData() { $adapter = $this->getConnection(); $reviewsIds = $this->getColumnValues('review_id'); $storesToReviews = array(); if (count($reviewsIds)>0) { $inCond = $adapter->prepareSqlCondition('review_id', array('in' => $reviewsIds)); $select = $adapter->select() ->from($this->_reviewStoreTable) ->where($inCond); $result = $adapter->fetchAll($select); foreach ($result as $row) { if (!isset($storesToReviews[$row['review_id']])) { $storesToReviews[$row['review_id']] = array(); } $storesToReviews[$row['review_id']][] = $row['store_id']; } } foreach ($this as $item) { if (isset($storesToReviews[$item->getId()])) { $item->setStores($storesToReviews[$item->getId()]); } else { $item->setStores(array()); } } }
In load():
if ($this->_addStoreDataFlag) { $this->_addStoreData(); }
The text was updated successfully, but these errors were encountered:
The code is available in the version dev56 recently released.
Sorry, something went wrong.
Merge pull request #292 from magento-vanilla/MAGETWO-36916
e9378e4
[Vanilla] very hot fix
Merge pull request #292 from magento-ogre/PR_Branch
81f85b3
[Ogres] Bug fixes and vendor dir part 2
No branches or pull requests
Class Mage_Rating_Model_Resource_Rating_Collection has method addStoresToCollection, that has code like this:
I think it need be refactored like in Mage_Review_Model_Resource_Review_Collection::addStoreData:
and Mage_Review_Model_Resource_Review_Collection::_addStoreDataFlag:
In load():
The text was updated successfully, but these errors were encountered: