Created
September 2, 2019 15:28
-
-
Save Sekiphp/0cfcb52428527a6813cdab97edd000cc to your computer and use it in GitHub Desktop.
Filtering on collection where is used method addWebsiteNamesToResult()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function _websiteFilter($collection, $column) | |
{ | |
if (!$value = $column->getFilter()->getValue()) { | |
return $this; | |
} | |
$stores = Mage::app()->getWebsite($value)->getStores(); | |
foreach ($stores as $store) { | |
$collection->addStoreFilter($store); | |
} | |
return $this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment