MAgento - 如何修复xml文件中的常量并将其放入模板phtml文件中

Biz*_*oss 0 magento

如何在自定义xml文件中修复常量并将其放入我的自定义模板phtml文件中?

感谢帮助 :)

Fab*_*ssa 5

在你的config.xml中

<default>
    <settings>
        <myconst>My Value</myconst>
    </settings>
</default>
Run Code Online (Sandbox Code Playgroud)

在.phtml文件中

<?php echo Mage::getStoreConfig('settings/myconst'); ?>
Run Code Online (Sandbox Code Playgroud)

也许这可能有所帮助,我现在无法尝试代码.