get website id by passing static store id in magento

get website id by passing static store id in magento

note : website id and store id might be different.

$storeId = 2;
$app = Mage::app();
$websiteId = $app->getStore($storeId)->getWebsiteId();
echo "<br />storeId : ".$storeId;
echo "<br />hpc_websiteId : ".$websiteId;

Share on Facebook