In a multi store environment there is sometimes a need to change the store when the user clicks a link.
A “simple” way to do this is to pass the store along in the url (just add a “?___store=” either id or the store name, so for instance.
$stores = $category->getStoreIds(); echo '<p><a href="'. Mage::getUrl() . '?___store=' . end($stores). '">'.$category->getName()."</a></p>";