Skip to main content
added 181 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

Let's say $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 $storeIds[0].

[Edit]
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.

Let's say $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 $storeIds[0].

Let's say $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 $storeIds[0].

[Edit]
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.

Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

Let's say $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 $storeIds[0].