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




About Pragnesh Karia

Pragnesh Karia, Open Source Enthusiast, Software Professional, Software Developer, Technical Lead ,Magento, Joomla ,Joomla LMS , Moodel LMS ,PHP ,Mysql, Ajax, Javascript, Jquery, Linux, Fan of Open Sources , Annet Technologies , SEO Analyst , Mootools