After hours
of huffing and puffing i was able to figure out a way to get the store information
programmatically :)
Get current store:
Mage::app()->getStore();
Get current store Id:
Mage::app()->getStore()->getId();
$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();
Let me know in the comments if this has helped you........... Enjoy........Happy coding :)....
Nice post.I am looking forward for new ones, keep up the great work.
ReplyDeleteThanks for your ideas. You can also find the details on Affity Solutions, at the
ReplyDeleteMagento Website Australia. The main object of the Affity Solutions is to provide quality web services and is among the few software development company in Australia.
Thank you for the very useful post. We will keep them in mind while we work.
ReplyDeleteMegento Development Services In Chandigarh
Hello Kamlesh,
ReplyDeleteThanks for such a great post you have shared with us. I am searching for this source code only.
Let me implement this.
Thanks & Best Regards
Hexagon | Magento Development Company India
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
ReplyDeletenewizze.com
This comment has been removed by the author.
ReplyDeleteThanks! really helpful
ReplyDelete