Skip to content

Instantly share code, notes, and snippets.

@wcodex
Created April 10, 2014 05:08
Show Gist options
  • Save wcodex/10344205 to your computer and use it in GitHub Desktop.
Save wcodex/10344205 to your computer and use it in GitHub Desktop.
Get basic details of Magento store
//To Get the current store
$store = Mage::app()->getStore();
//To get Store Id
$store_id = Mage::app()->getStore()->getStoreId();
//To get Store Code
$store_code = Mage::app()->getStore()->getCode();
//To get Website Id
$store_website_id = Mage::app()->getStore()->getWebsiteId();
//To get Store Name
$store_name = Mage::app()->getStore()->getName();
//To get Store Status
$store_status = Mage::app()->getStore()->getIsActive();
//To get Store Home Url
$store_home_url = Mage::app()->getStore()->getHomeUrl();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment