I have a website having one store and one view. e.g) Main Website Main Store Main View so now i want to get Main View id from Main website id. how can i do that? Thank You
$website is the instance of your website entity.
You can get the store view ids for a website like this:
$storeIds = $website->getStoreIds();
This will return an array;
If you want the first store id (the only one in your case) use
If you have the website id, you can get the website object like this:
$website = Mage::getModel('core/website')->load($websiteId);
then use the code above.