Beispiel #1
0
 public function doUpdate($currentVersion)
 {
     // 增加了新的设置选项
     ShopThemePlugin::saveOptionValue('goods_after_service', '这里是售后服务说明');
     // 设置新的版本
     ShopThemePlugin::saveOptionValue('version', $this->targetVersion);
     return true;
 }
Beispiel #2
0
 public function doUpdate($currentVersion)
 {
     // 增加了新的设置选项
     ShopThemePlugin::saveOptionValue('goods_view_detail_notice', null);
     // 设置新的版本
     ShopThemePlugin::saveOptionValue('version', $this->targetVersion);
     return true;
 }
Beispiel #3
0
 public function doUpdate($currentVersion)
 {
     // 增加了新的设置选项
     ShopThemePlugin::saveOptionValue('business_qq', null);
     // 设置新的版本
     ShopThemePlugin::saveOptionValue('version', $this->targetVersion);
     return true;
 }
Beispiel #4
0
 public function doUpdate($currentVersion)
 {
     // 增加了新的设置选项
     ShopThemePlugin::saveOptionValue('goods_search_adv_slider', null);
     ShopThemePlugin::saveOptionValue('goods_view_adv_slider', null);
     // 设置新的版本
     ShopThemePlugin::saveOptionValue('version', $this->targetVersion);
     return true;
 }
Beispiel #5
0
 public function post($f3)
 {
     // 权限检查
     $this->requirePrivilege('manage_plugin_theme_configure');
     // 保存数据
     ShopThemePlugin::saveOptionValue('head_nav_json_data', json_encode($f3->get('POST[headNav]')));
     // 清除 所有页面
     $shopClear = new ShopClear();
     $shopClear->clearAllCache();
     $this->addFlashMessage('保存设置成功');
     RouteHelper::reRoute($this, '/Theme/Shop/HeadNav');
 }
Beispiel #6
0
 public function doUpdate($currentVersion)
 {
     // 增加了新的设置选项
     ShopThemePlugin::saveOptionValue('shop_index_notice', '这里是网站公告');
     ShopThemePlugin::saveOptionValue('smarty_cache_time_article_view', 86400);
     $jsonArray = array(array('title' => '', 'url' => ''));
     ShopThemePlugin::saveOptionValue('head_nav_json_data', json_encode($jsonArray));
     $jsonArray = array(0 => array('title' => '新手指南', 'item' => array(0 => array('title' => '账户注册', 'url' => '#'), 1 => array('title' => '购物流程', 'url' => '#'), 3 => array('title' => '付款方式', 'url' => '#'), 4 => array('title' => '常见问题', 'url' => '#'))), 1 => array('title' => '配送方式', 'item' => array(0 => array('title' => '配送说明', 'url' => '#'), 1 => array('title' => '订单拆分', 'url' => '#'))), 2 => array('title' => '支付方式', 'item' => array(0 => array('title' => '在线支付', 'url' => '#'), 1 => array('title' => '其它支付方式', 'url' => '#'))), 3 => array('title' => '售后服务', 'item' => array(0 => array('title' => '退换货政策', 'url' => '#'), 1 => array('title' => '退换货办理流程', 'url' => '#'))), 4 => array('title' => '购物保障', 'item' => array(0 => array('title' => '免责声明', 'url' => '#'), 1 => array('title' => '隐私保护', 'url' => '#'), 2 => array('title' => '注册协议', 'url' => '#'), 3 => array('title' => '正品保障', 'url' => '#'))));
     ShopThemePlugin::saveOptionValue('foot_nav_json_data', json_encode($jsonArray));
     $jsonArray = array(array('title' => '', 'url' => ''));
     ShopThemePlugin::saveOptionValue('friend_link_json_data', json_encode($jsonArray));
     // 设置新的版本
     ShopThemePlugin::saveOptionValue('version', $this->targetVersion);
     return true;
 }
Beispiel #7
0
 public function post($f3)
 {
     // 权限检查
     $this->requirePrivilege('manage_plugin_theme_adv_configure');
     // 参数验证
     $validator = new Validator($f3->get('POST'));
     // 广告设置 json 数据,由 JavaScript 打包发送过来
     $shop_index_advblock_json_data = $validator->validate('shop_index_advblock_json_data');
     $jsonObject = json_decode($shop_index_advblock_json_data, true);
     if (empty($jsonObject)) {
         $shop_index_advblock_json_data = null;
     }
     ShopThemePlugin::saveOptionValue('shop_index_advblock_json_data', $shop_index_advblock_json_data);
     // 清除 /Shop/Index 页面
     $shopClear = new ShopClear();
     $shopClear->clearHomePage();
     $this->addFlashMessage('保存设置成功');
     RouteHelper::reRoute($this, '/Theme/Shop/AdvShopBlock');
 }
Beispiel #8
0
 public function post($f3)
 {
     // 权限检查
     $this->requirePrivilege('manage_plugin_theme_configure');
     // 参数验证
     $validator = new Validator($f3->get('POST'));
     foreach ($this->optionKeyArray as $optionKey) {
         if (in_array($optionKey, $this->optionKeyNoFilterArray)) {
             $optionValue = $f3->get('POST[' . $optionKey . ']');
         } else {
             $optionValue = $validator->validate($optionKey);
         }
         ShopThemePlugin::saveOptionValue($optionKey, $optionValue);
     }
     // 清除 /Shop/Index 页面
     $shopClear = new ShopClear();
     $shopClear->clearAllCache();
     $this->addFlashMessage('保存设置成功');
     out_display:
     global $smarty;
     $smarty->display('theme_shop_basic.tpl', 'post');
 }
Beispiel #9
0
 public function post($f3)
 {
     // 权限检查
     $this->requirePrivilege('manage_plugin_theme_adv_configure');
     // 参数验证
     $validator = new Validator($f3->get('POST'));
     // slider 广告设置
     $imageArray = $validator->validate('image');
     $urlArray = $validator->validate('url');
     $targetArray = $validator->validate('target');
     $imageSize = is_array($imageArray) ? count($imageArray) : 0;
     $shop_index_adv_slider = array();
     // 组织数据结构
     for ($index = 0; $index < $imageSize; $index++) {
         $shop_index_adv_slider[] = array('image' => $imageArray[$index], 'url' => $urlArray[$index], 'target' => $targetArray[$index]);
     }
     ShopThemePlugin::saveOptionValue('shop_index_adv_slider', json_encode($shop_index_adv_slider));
     // 清除 /Shop/Index 页面
     $shopClear = new ShopClear();
     $shopClear->clearHomePage();
     $this->addFlashMessage('保存设置成功');
     RouteHelper::reRoute($this, '/Theme/Shop/AdvShopSlider');
 }
Beispiel #10
0
 public function doUpdate($currentVersion)
 {
     // 简单的把版本设置为 1.0.0 就算完成升级了
     ShopThemePlugin::saveOptionValue('version', $this->targetVersion);
     return true;
 }