Tuesday, July 26, 2011

How to get store information in magento?

    // Get store data
    Mage::app()->getStore();

    // Store Id
    Mage::app()->getStore()->getStoreId();

    // Store code
    Mage::app()->getStore()->getCode();

    // Website Id
    Mage::app()->getStore()->getWebsiteId();

    // Store Name
    Mage::app()->getStore()->getName();

    // Is Active
    Mage::app()->getStore()->getIsActive();

    // Store Home Url
    Mage::app()->getStore()->getHomeUrl(); 

No comments:

Post a Comment