Magento: Display the store telephone number

Mar 13, 2011

Displaying the store telephone number that you entered into the Magento Admin seems like it should be obvious but it took me ages to track down, here is how.

In a template file you add the telephone number by calling getStoreConfig like this…

<?php echo Mage::getStoreConfig('general/store_information/phone'); ?>

But from within the CMS, it is much simpler – there is actually a link to insert it somewhere in the menu that generates the following code…

{{config path="general/store_information/phone"}}