Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sekiphp/0cfcb52428527a6813cdab97edd000cc to your computer and use it in GitHub Desktop.
Save Sekiphp/0cfcb52428527a6813cdab97edd000cc to your computer and use it in GitHub Desktop.
Filtering on collection where is used method addWebsiteNamesToResult()
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