Magento doesn't seem to like me setting blank config values at website
or store
level.
Steps to reproduce (1.6.2.0, 1.7.0.1, 1.7.0.2)
1) change config scope to website
2) untick use default next to 'default welcome message'
3) clear the text in the field
4) save
At this stage Magento will re-tick the use default box, however, it has saved my blank value. The next time I save this config page the config value from the default level is used.
This functionality was not present in 1.4, and I don't have 1.5 to test.
My question is, how do I create blank config values at the website or store level?
Update
In version 1.7.02 the code looks like this:
$path = (string)$element->config_path;
if (empty($path)) {
$path = $section->getName() . '/' . $group->getName() . '/' . $fieldPrefix . $element->getName();
} elseif (strrpos($path, '/') > 0) {
// Extend config data with new section group
$groupPath = substr($path, 0, strrpos($path, '/'));
if (!isset($configDataAdditionalGroups[$groupPath])) {
$this->_configData = $this->_configDataObject->extendConfig(
$groupPath,
false,
$this->_configData
);
$configDataAdditionalGroups[$groupPath] = true;
}
}
And it uses empty()
to evaluate the string.
Does anyone have a suggestion to modify this code to allow empty strings that I specify to override the default?