vietean
vietean

Reputation: 3033

How to set global configuration in Magento?

I am going to talking about some the config issue in Magento:

Let me assume that:

If I want to declare some global configuration in app/etc/config.xml for:

I want to set delay time for refresh page as 5000ms.

In the code, I will try to get like below:

Mage::app()->getConfig()->getDelayTime();

or

Mage::app()->getConfig()->get('delaytime');

How should I do?

Upvotes: 1

Views: 1267

Answers (1)

vsushkov
vsushkov

Reputation: 2435

Inside default node put something like

<settings>
    <delaytime>5000</delaytime>
</settings>

and then get this value:

<?php Mage::getStoreConfig('settings/delaytime'); ?>

Upvotes: 6

Related Questions