I tried :
$store = Mage::app()->getStore();
$configValue = Mage::getStoreConfig('design/themes/templates', $store);
but it returned null. Where is my fault? p.s. Value set
If you want to get the config of the currently viewed store:
$configValue = Mage::getStoreConfig('sectionName/groupName/fieldName');
If you want to get the config of one of the other stores and not the current one:
$store = Mage::app()->getStore();
$configValue = Mage::getStoreConfig('sectionName/groupName/fieldName', $store);
I guess you want to get your current theme, so you need this:
$configValue = Mage::getStoreConfig('design/theme/template');
For Magento 1.9 :
Get Store Id :
Mage::app()->getStore()->getStoreId();
Get Config Value :
$configValue = Mage::getStoreConfig('sectionName/groupName/fieldName', $storeId);
as per store vise :
$storeId = 2; // ID of the store you want to fetch the value of
$configValue = Mage::getStoreConfig('sectionName/groupName/fieldName', $storeId);
Get Config Value in phtml:
<?php echo Mage::getStoreConfig('design/themes/templates') ?>