What config.xml settings can be set in the database?
-
31-10-2019 - |
Question
I'm looking to learn more about the internals of Magento!
I recently used Inchoo's tutorial to allow administrators to set a crontab schedule from System > Configuration. See it here. In it, I noticed that a setting which is usually set in config.xml
is being set in the database table core_config_data
instead.
Normal config.xml
method:
<crontab>
<jobs>
<my_custom_crontab>
<schedule><cron_expr>* * * * *</cron_expr></schedule>
<run><model>mymodule/observer::hookMethod</model></run>
</my_custom_crontab>
</jobs>
</crontab>
Alternate Database Record:
scope scope_id path value
default 0 crontab/jobs/my_custom_crontab/schedule/cron_expr * * * * *
Can anyone tell me
- What config settings can be located in the database, or if all of them can be.
- Where Magento's logic (code) to pull these values from the database lives.
- What the hierarchy looks like / what is given priority.
One side effect I've noticed from storing these config.xml
settings in the database is that they suddenly have scope. (default, website, store, store view.) I'm not aware of replicating such scope in the config.xml
files, so I'm also wondering how that figures in.
Thanks!
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange