After hours of searching on Google, i find out some ways to get Store and Website info 🙂
Get current store:
      Mage::app()->getStore();
Get current store Id:
Mage::app()->getStore()->getId();
Get current website Id:
$storeId = Mage::app()->getStore()->getId();
Mage::getModel(‘core/store’)->load( $storeId )->getWebsiteId();
Get store info by store code:
$storeCode = “your_store_code”;
Mage::getModel( “core/store” )->load( $storeCode );
Get website info by website code:
$websiteCode = “your_website_code”;
Mage::getModel( “core/website” )->load( $websiteCode );
Get all stores:
Mage::app()->getStores();
Happy coding :)….
Revisions
- November 16, 2015 @ 18:26:09 [Current Revision] by admin
- November 16, 2015 @ 18:26:09 by admin
No comments yet.