Permalink
Browse files

Set configuration of default store view ("config-defaultset")

  • Loading branch information...
1 parent eaf0c17 commit 90502ef99bde1bd9dea50338b193e626f71a1260 @ceefour ceefour committed Oct 28, 2011
Showing with 18 additions and 4 deletions.
  1. +17 −3 app/plugins/Config.php
  2. +1 −1 wiz.bash_completion.sh
@@ -54,7 +54,7 @@ public function getAction($options) {
/**
* Retrieve a single store configuration node path.
*
- * Example: config-storget sales_email/order/enabled
+ * Example: config-storeget sales_email/order/enabled
* This will return the value in the configuration if the order e-mails are enabled.
*
* @param Node path string.
@@ -132,8 +132,22 @@ public function asxmlAction() {
return TRUE;
}
- public function setAction($options) {
-
+ /**
+ * config-defaultset CONFIG_PATH VALUE
+ * @param array $options
+ * @return boolean true if successful
+ */
+ public function defaultsetAction($options) {
+ $configPath = $options[0];
+ $value = $options[1];
+ $scope = 'default';
+ $scopeId = 0;
+
+ $config = Wiz::getMagento()->getConfig();
+ // this will take effect at *next* invocation
+ $config->saveConfig($configPath, $value, $scope, $scopeId);
+ echo "[$scope.$scopeId] $configPath = $value". PHP_EOL;
+ return true;
}
}
@@ -35,7 +35,7 @@ _wiz() {
config-storeget
config-xpath
config-asxml
- config-set
+ config-defaultset
indexer-status
indexer-reindex
indexer-realtime

0 comments on commit 90502ef

Please sign in to comment.