Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

afwollis

Ветеран спільноти
  • Публікації

    11 658
  • З нами

  • Відвідування

Повідомлення, опубліковані користувачем afwollis

  1. да, вот этот момент я тогда упустил - не описал изменения в контроллере для вывода языковых переменных. :(

    но уже исправился ^_^

    смотрите первую часть (цитату) в части изменений админки в том моем сообщении

    • +1 1
  2. gdi31, бу-га-га

    откуда вы столько мусора насобирали?

    должен быть только один файл

    ВАШ_DOC_ROOT/system/library/response.php

    ВАШ_DOC_ROOT/catalog/controller/
    ВАШ_DOC_ROOT/catalog/language/
    ВАШ_DOC_ROOT/catalog/model/
    ВАШ_DOC_ROOT/catalog/view/

    ВАШ_DOC_ROOT/download/...электронные_товары_для_скачивания
    • +1 1
  3. если заработало, то скорее всего

    либо кончилось место на диске;

    либо достигли лимита файлов в папке;

    настоятельно рекомендую прояснить этот момент с хостером.

    от периодически падающего магазина толку мало.

  4. либо

    a href="javascript:history.go(-1)"
    либо

    Don't rely on the HTTP Referrer being a valid or even non-empty field. People can choose to not have this set leaving any checks for that variable going to the empty side of the IF-ELSE clause.

    You can guard against this by sending along a parameter in either the URL or POST parameters that would hold a value that you can use to redirect the user back to.

    http://stackoverflow.com/questions/606288/php-html-http-referer
    • +1 1
  5. в коде нет ни ошибок, ни пропущенных символов.

    единственный вариант - форум порвал строку.

    admin/model/catalog/information.php
    foreach ($query->rows as $result) {
    			/* это одна строка - начало */$information_description_data[$result['language_id']] = array(/* это одна строка - конец */
    				'title'       => $result['title'],
    				'description' => $result['description'],
    				'meta_keywords'       => $result['meta_keywords'],
    				'meta_description' => $result['meta_description'],
    				'page_title'       => $result['page_title'],
    				'h1'       => $result['h1']
    			);
    		}
    UPD

    и вобще - насчет ошибки последней:

    в модели

    admin/model/catalog/information.php
    надо привести подобные участки кода к приведенному виду.

    а вы, судя по тексту ошибки, что-то там намудрили лишнего.

    перепроверьте

    • +1 1
  6. DB

    ALTER TABLE  `information_description` ADD  `meta_keywords` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;
    ALTER TABLE  `information_description` ADD  `meta_description` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;
    ALTER TABLE  `information_description` ADD  `page_title` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;
    ALTER TABLE  `information_description` ADD  `h1` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;

    ADMIN (добавлено описание вставки двух четырех строк в admin/controller/catalog/information.php)

    admin/controller/catalog/information.php
    в функции

    private function getForm() {
    после

    $this->data['entry_sort_order'] = $this->language->get('entry_sort_order');
    		$this->data['entry_status'] = $this->language->get('entry_status');
    добавить

    /* w - seo-mod - meta - part_#1 - start */
    		$this->data['entry_meta_keywords'] = $this->language->get('entry_meta_keywords');
    		$this->data['entry_meta_description'] = $this->language->get('entry_meta_description');
    		$this->data['entry_page_title'] = $this->language->get('entry_page_title');
    		$this->data['entry_h1'] = $this->language->get('entry_h1');
    /* w - seo-mod - meta - part_#1 - end */

    admin/language/russian/catalog/information.php
    /* w - seo-mod - meta - part_#1 - start */
    $_['entry_meta_keywords'] = 'Meta Keywords:';
    $_['entry_meta_description'] = 'Meta Description:';
    $_['entry_page_title'] = 'Заголовок страницы:';
    $_['entry_h1'] = 'H1:';
    /* w - seo-mod - meta - part_#1 - end */

    admin/model/catalog/information.php

    public function addInformation($data) {
    foreach ($data['information_description'] as $language_id => $value) {
    			$this->db->query("INSERT INTO " . DB_PREFIX . "information_description SET information_id = '" . (int)$information_id . "', language_id = '" . (int)$language_id . "', title = '" . $this->db->escape($value['title']) . "', description = '" . $this->db->escape($value['description']) . "', meta_keywords = '" . $this->db->escape($value['meta_keywords']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', page_title = '" . $this->db->escape($value['page_title']) . "', h1 = '" . $this->db->escape($value['h1']) . "'");
    		}

    public function editInformation($information_id, $data) {
    foreach ($data['information_description'] as $language_id => $value) {
    			$this->db->query("INSERT INTO " . DB_PREFIX . "information_description SET information_id = '" . (int)$information_id . "', language_id = '" . (int)$language_id . "', title = '" . $this->db->escape($value['title']) . "', description = '" . $this->db->escape($value['description']) . "', meta_keywords = '" . $this->db->escape($value['meta_keywords']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', page_title = '" . $this->db->escape($value['page_title']) . "', h1 = '" . $this->db->escape($value['h1']) . "'");
    		}

    public function getInformationDescriptions($information_id) {
    foreach ($query->rows as $result) {
    			$information_description_data[$result['language_id']] = array(
    				'title'       => $result['title'],
    				'description' => $result['description'],
    				'meta_keywords'       => $result['meta_keywords'],
    				'meta_description' => $result['meta_description'],
    				'page_title'       => $result['page_title'],
    				'h1'       => $result['h1']
    			);
    		}

    admin/view/template/catalog/information_form.tpl
    ПОСЛЕ

    <tr>
                <td><span class="required">*</span> <?php echo $entry_description; ?></td>
                <td><textarea name="information_description[<?php echo $language['language_id']; ?>][description]" id="description<?php echo $language['language_id']; ?>"><?php echo isset($information_description[$language['language_id']]) ? $information_description[$language['language_id']]['description'] : ''; ?></textarea>
                  <?php if (isset($error_description[$language['language_id']])) { ?>
                  <span class="error"><?php echo $error_description[$language['language_id']]; ?></span>
                  <?php } ?></td>
              </tr>
    Добавляем

    <tr>
              <td><?php echo $entry_meta_keywords; ?></td>
              <td><input type="text" name="information_description[<?php echo $language['language_id']; ?>][meta_keywords]" value="<?php echo isset($information_description[$language['language_id']]) ? $information_description[$language['language_id']]['meta_keywords'] : ''; ?>" size="100" /></td>
            </tr>
            <tr>
              <td><?php echo $entry_meta_description; ?></td>
              <td><textarea name="information_description[<?php echo $language['language_id']; ?>][meta_description]" cols="50" rows="8"><?php echo isset($information_description[$language['language_id']]) ? $information_description[$language['language_id']]['meta_description'] : ''; ?></textarea></td>
            </tr>
            <tr>
              <td><?php echo $entry_page_title; ?></td>
              <td><input type="text" name="information_description[<?php echo $language['language_id']; ?>][page_title]" value="<?php echo isset($information_description[$language['language_id']]) ? $information_description[$language['language_id']]['page_title'] : ''; ?>" size="100" /></td>
            </tr>
            <tr>
              <td><?php echo $entry_h1; ?></td>
              <td><input type="text" name="information_description[<?php echo $language['language_id']; ?>][h1]" value="<?php echo isset($information_description[$language['language_id']]) ? $information_description[$language['language_id']]['h1'] : ''; ?>" size="100" /></td>
            </tr>

    CATALOG

    catalog/controller/information/information.php
    Меняем

    $this->document->title = $information_info['title'];
    На

    if ($information_info['meta_keywords']) {
    				$this->document->keywords = $information_info['meta_keywords'];
    			}
    			
    			if ($information_info['meta_description']) {
    				$this->document->description = $information_info['meta_description'];
    			}
    			
    			if ($information_info['page_title']) {
    				$this->document->title = $information_info['page_title'];
    			} else {
    				$this->document->title = $information_info['title'];
    			}
    • +1 4
  7. catalog/controller/common/header.php
    /* w - welcome guest | user - part_#1 - start */
    		if ($this->customer->isLogged()) {
    			$w_name = $this->customer->getFirstName()." ".$this->customer->getLastName();
    			$this->data['w_welcome'] = sprintf($this->language->get('text_welcome_user'), $w_name);
    		} else {
    			$this->data['w_welcome'] = $this->language->get('text_welcome_guest');
    		}
    		/* w - welcome guest | user - part_#1 - end */

    catalog/language/english/common/header.php
    /* w - welcome guest | user */
    $_['text_welcome_guest'] = 'Welcome, guest!';
    $_['text_welcome_user'] = 'Welcome, %s!';

    catalog/view/theme/default/template/common/header.tpl
    <div class="div10">  <a onclick="moduleSearch();" class="button"><span><?php echo $button_go; ?></span></a> <a href="<?php echo str_replace('&', '&', $advanced); ?>"><?php echo $text_advanced; ?></a></div>
              <!-- w - welcome guest | user - part_#1 - start //-->
              <div style="float:right;"><?php echo $w_welcome; ?></div>
              <!-- w - welcome guest | user - part_#1 - end //-->
    • +1 2
×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.