Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Запись в базу


yurabr
 Share

Recommended Posts

<file path="admin/controller/setting/setting.php">

<operation error="skip">
<search><![CDATA[$data['entry_google_analytics'] = $this->language->get('entry_google_analytics');]]></search>
			<add position="after"><![CDATA[$data['entry_min_price_order'] = $this->language->get('entry_min_price_order');
		$data['entry_nomer_group'] = $this->language->get('entry_nomer_group');]]></add>
		</operation>
		
		<operation error="skip">
<search><![CDATA[$data['config_fax'] = $this->config->get('config_fax');]]></search>
			<add position="after" offset="3"><![CDATA[if (isset($this->request->post['min_price_order'])) {
			$data['min_price_order'] = $this->request->post['min_price_order'];
		} else {
			$data['min_price_order'] = $this->config->get('min_price_order');
		}
		
		if (isset($this->request->post['nomer_group'])) {
			$data['nomer_group'] = $this->request->post['nomer_group'];
		} else {
			$data['nomer_group'] = $this->config->get('nomer_group');
		}
		
		if (isset($this->request->post['nomer_group_2'])) {
			$data['nomer_group_2'] = $this->request->post['nomer_group_2'];
		} else {
			$data['nomer_group_2'] = $this->config->get('nomer_group_2');
		}
		
		if (isset($this->request->post['nomer_group_3'])) {
			$data['nomer_group_3'] = $this->request->post['nomer_group_3'];
		} else {
			$data['nomer_group_3'] = $this->config->get('nomer_group_3');
		}
		
		if (isset($this->request->post['nomer_group_4'])) {
			$data['nomer_group_4'] = $this->request->post['nomer_group_4'];
		} else {
			$data['nomer_group_4'] = $this->config->get('nomer_group_4');
		}
		
		if (isset($this->request->post['nomer_group_5'])) {
			$data['nomer_group_5'] = $this->request->post['nomer_group_5'];
		} else {
			$data['nomer_group_5'] = $this->config->get('nomer_group_5');
		}
		
		if (isset($this->request->post['nomer_group_6'])) {
			$data['nomer_group_6'] = $this->request->post['nomer_group_6'];
		} else {
			$data['nomer_group_6'] = $this->config->get('nomer_group_6');
		}
		
		if (isset($this->request->post['nomer_group_7'])) {
			$data['nomer_group_7'] = $this->request->post['nomer_group_7'];
		} else {
			$data['nomer_group_7'] = $this->config->get('nomer_group_7');
		}]]></add>
		</operation>	
		</file>
  
  <file path="admin/view/template/setting/setting.tpl">

<operation error="skip">
<search><![CDATA[<input type="text" name="config_fax" value="<?php echo $config_fax; ?>" placeholder="<?php echo $entry_fax; ?>" id="input-fax" class="form-control" />]]></search>
			<add position="after" offset="2"><![CDATA[<div class="form-group">
                <label class="col-sm-2 control-label" for="input-fax"><?php echo $entry_min_price_order; ?></label>
                <div class="col-sm-10">
                  <input type="text" name="min_price_order" value="<?php echo $min_price_order; ?>" placeholder="<?php echo $min_price_order; ?>" class="form-control" />
                </div>
              </div>
			  <div class="form-group">
                <label class="col-sm-2 control-label" for="input-fax"><?php echo $entry_nomer_group; ?></label>
                <div class="col-sm-10">
                  <td><input style="width: 40px;" type="text" name="nomer_group" value="<?php echo $nomer_group; ?>" /><input style="width: 40px;" type="text" name="nomer_group_2" value="<?php echo $nomer_group_2; ?>" /><input style="width: 40px;" type="text" name="nomer_group_3" value="<?php echo $nomer_group_3; ?>" /><input style="width: 40px;" type="text" name="nomer_group_4" value="<?php echo $nomer_group_4; ?>" /><input style="width: 40px;" type="text" name="nomer_group_5" value="<?php echo $nomer_group_5; ?>" /><input style="width: 40px;" type="text" name="nomer_group_6" value="<?php echo $nomer_group_6; ?>" /><input style="width: 40px;" type="text" name="nomer_group_7" value="<?php echo $nomer_group_7; ?>" /></td>
                </div>
              </div>]]></add>
		</operation>
		
		</file>

Вот такая вот штука.

Все это у меня работало и работает на опенкарт 1.5.6

Пытаюсь логику перенести на Оссторе 2.3

Ничего никуда не пишет.

Чего я не правильно делаю?

Спасибо.

 

P.S. На опенкарт было $this->data

Link to comment
Share on other sites


чтобы в бд сохраняло какие-то дополнительные поля - их сначала нужно создать

и добавлять еще и в саму модель/запрос к БД

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.