list of websites in magento

If you want to know what websites and how many are installed in magento you can get that information from getWebsites method of the Mage_Core_Model_App object.

$storeCodeAsKey = true;

$websitesCollection = Mage::app()->getWebsites(false,$storeCodeAsKey);

	echo "<pre>";
	print_r(count($websitesCollection) . "\n");
	foreach ($websitesCollection as $website => $value)
		print_r(($storeCodeAsKey ? "Store Code:":"Store Id:") . $website . "\n");
	echo "</pre>";

Patching Magento

All your effort could come to nothing with faulty installation, and it is likely that you have it as some of the bugs related to the API are still not addressed, you may find that your api calls returns the empty results (resources list) or you can’t save your selection for “roles resources”. To fix it you need a patch, so far I needed to patch 2 magento core files, the fixes are from the magento community found on the magento forum.

magetno user role acl saving problem in admin
Magento API returning empty resources array

If you need to patch it, copy affected file from the core “codePool” into the same folder structure in local “codePool” and update/fix file.

For more clarity I supposed to add an example:) I will do it now, better later than never:)

As an example I will use patched file from second link:

copy this file from “core” code pool

to the “local” code pool

and then amend it as you wish:)