search
top

Website ID from Store Group ID in Magento

Hello All, I am posting here code for fetching website information from Store Group Id. Also useful code showing relations between Stores, Groups and Websites. < ?php $store_id = 1; //your required store Id will go here $store_model = Mage::getModel('core/store'); //store model $store_group_model = Mage::getModel('core/store_group'); //store group model $website_model = Mage::getModel('core/website');...
read more

Magento Essentials

I am listing below important variable used in Magento. <?php echo Mage::app()->getFrontController()->getRequest()->getHttpHost(); //displays host name echo Mage::getBaseDir(); //gives physical path of the sites root directory echo $this->getSkinURL(); //gives relative path of the sites default skin folder echo Mage::getBaseURL(); //gives relative path of the site echo...
read more

top