Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Помогите плиз! Не записывает параметр модуля


Recommended Posts

Адаптирую один из модулей для 1.5 под 2.0.

В модуле 2 параметра - ситус вкл./выкл. и еещё один.

Врогде все сгделал, но ситус записывается, а вот второй параметр почему-то не сохраняется.

 

При этом форма передает оба параметра в этом куске.

		if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {

			$this->model_setting_setting->editSetting('fast_opt', $this->request->post);

			$this->session->data['success'] = $this->language->get('text_success');

			$this->response->redirect($this->url->link('extension/feed', 'token=' . $this->session->data['token'], 'SSL'));
		}

Еещё кусок контроллера:

		if (isset($this->request->post['fast_opt_status'])) {
			$data['fast_sitemap_status'] = $this->request->post['fast_opt_status'];
		} else {
			$data['fast_sitemap_status'] = $this->config->get('fast_opt_status');
		}

		if (isset($this->request->post['f_s_cache_status'])) {
			$data['f_s_cache_status'] = $this->request->post['f_s_cache_status'];
		} else {
			$data['f_s_cache_status'] = $this->config->get('f_s_cache_status');
		}

Кусок шаблона:

        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form-google-base" class="form-horizontal">
          <div class="form-group">
            <label class="col-sm-2 control-label" for="input-status"><?php echo $entry_status; ?></label>
            <div class="col-sm-10">
              <select name="fast_opt_status" id="input-status" class="form-control">
                <?php if ($fast_sitemap_status) { ?>
                	<option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                	<option value="0"><?php echo $text_disabled; ?></option>
                <?php } else { ?>
                	<option value="1"><?php echo $text_enabled; ?></option>
                	<option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                <?php } ?>
              </select>
            </div>
          </div>

          <div class="form-group">
            <label class="col-sm-2 control-label" for="input-data-feed"><?php echo $entry_cache_status; ?></label>
            <div class="col-sm-10">

<select name="f_s_cache_status" id="input-status" class="form-control">
	<?php if ($f_s_cache_status) { ?>
		<option value="1" selected="selected"><?php echo $text_enabled; ?></option>
		<option value="0"><?php echo $text_disabled; ?></option>
	<?php } else { ?>
		<option value="1"><?php echo $text_enabled; ?></option>
		<option value="0" selected="selected"><?php echo $text_disabled; ?></option>
	<?php } ?>
</select>

            </div>
          </div>
        
        </form>

Помогите разобраться...

Почему не сохраняется параметр f_s_cache_status?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.