Pages

Tuesday, July 2, 2013

Get Store and Admin values in your template – Magento

The post title might be a little confusing, let me enlighten you ;)

Have you ever wanted to print a value from your Magento Admin?

Have you ever needed to retrieve a value from a custom Module?

You can easily do that with the following core function:
<?php echo Mage::getStoreConfig('general/store_information/name'); ?>

As you can see, this getStoreConfig accepts a parameter. This parameter is the location of the value you’re trying to retrieve.

In the example above we’re printing:

System > Configuration > General > Store Information > Name

No comments:

Post a Comment