In magento a website can have multiple stores if you require information like:
- store id,
- store code,
- store name, etc.
You can do this with the following code:
Get store data array::
// Get all store data in an array Mage::app()->getStore();
Get store ID:
Mage::app()->getStore()->getStoreId();
Get store code:
Mage::app()->getStore()->getCode();
Get website ID of store:
Mage::app()->getStore()->getWebsiteId();
Get store name:
Mage::app()->getStore()->getName();
Check if store is active
Mage::app()->getStore()->getIsActive();
Get homepage URL of the store:
Mage::app()->getStore()->getHomeUrl();
Get current page URL of the store:
Mage::app()->getStore()->getCurrentUrl();
Store Name:
$store_address= Mage::getStoreConfig('general/store_information/name');
Store Contact Address:
$store_address= Mage::getStoreConfig('general/store_information/address');
Store Contact Telephone:
$store_phone= Mage::getStoreConfig('general/store_information/phone');
Store Customer Support Email:
$customer_support_email= Mage::getStoreConfig('trans_email/ident_support/email');
Store Hours of Operation:
$store_hours= Mage::getStoreConfig('general/store_information/hours');
For CMS pages insert the following variable:
{{config path="general/store_information/phone"}}
0 Comments