![](/img/trans.png)
[英]how to set value of hidden or text field when user clicks save in prestashop1.6
[英]How to save array value as configuration value in Prestashop 1.6
我有一个数组,例如:
[0] => Array
(
[id_order_state] => 2
[name] => Text
)
我想使用此代码保存此值,但我不能。
Configuration::updateValue('SELECTED_STATUSES', $array);
在 /classes/Configuration.php 我有关于这个的更多信息:
/**
* Update configuration key and value into database (automatically insert if key does not exist)
*
* Values are inserted/updated directly using SQL, because using (Configuration) ObjectModel
* may not insert values correctly (for example, HTML is escaped, when it should not be).
* @TODO Fix saving HTML values in Configuration model
*
* @param string $key Key
* @param mixed $values $values is an array if the configuration is multilingual, a single string else.
* @param bool $html Specify if html is authorized in value
* @param int $id_shop_group
* @param int $id_shop
* @return bool Update result
*/
public static function updateValue($key, $values, $html = false, $id_shop_group = null, $id_shop = null)
感谢您的帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.