博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Fetching and Updating Magento Config Data
阅读量:4203 次
发布时间:2019-05-26

本文共 1093 字,大约阅读时间需要 3 分钟。

Fetching and Updating Magento Config Data

03 10 2011

In Magnto, it’s easy to update configuration data for a store through the admin interface, or by going into the database itself and making the changes (after getting your head round EAV). The table core_config_data in particular holds a lot of this information. There is also a way of doing this via PHP/MySql by using Magento’s own inbuilt functions.

The function accepts only a few arguments: saveConfig( pathToData, value, websiteScope, scopeId );

The example below shows updating the default store name, first by initiating the core config model, then by applying the function.

 

$updateconfigdata = new Mage_Core_Model_Config();$updateconfigdata->saveConfig('general/store_information/name', "My New Store Name", 'default', 0);

 

This could come in useful if you need to make config changes based on user input on the frontend (though no uses come immediately to mind).

It’s easy to get config data using the function getStoreConfig() and entering the path as the only argument.

 

echo Mage::getStoreConfig('general/store_information/name');

转载地址:http://ppcli.baihongyu.com/

你可能感兴趣的文章
用上帝之眼进行自动化测试
查看>>
为LoadRunner写一个lr_save_float函数
查看>>
PrefTest工作室全新力作-《性能测试与调优实战》课程视频即将上线
查看>>
质量度量分析与测试技术 培训大纲
查看>>
欢迎加入【亿能测试快讯】邮件列表!
查看>>
为什么我们的自动化测试“要”这么难
查看>>
LoadRunner性能脚本开发实战训练
查看>>
测试之途,前途?钱途?图何?
查看>>
测试设计与测试项目实战训练
查看>>
HP Sprinter:敏捷加速器
查看>>
单元测试培训PPT
查看>>
adb常用命令
查看>>
通过LR监控Linux服务器性能
查看>>
通过FTP服务的winsockes录制脚本
查看>>
LRwinsocket协议测试AAA服务器
查看>>
Net远程管理实验
查看>>
反病毒专家谈虚拟机技术 面临两大技术难题
查看>>
几种典型的反病毒技术:特征码技术、覆盖法技术等
查看>>
性能测试一般过程与LR性能测试过程
查看>>
Software Security Testing软件安全测试
查看>>