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

Meta Keywords на главной странице(версия opencart 1.5.1.3)


Recommended Posts

Подскажите, как сделать вывод meta keywords на главной.

Вот этот метод не помогает.

шаг #1

открываем

admin/controller/setting/setting.php

после

$this->data['entry_meta_description'] = $this->language->get('entry_meta_description');

вставляем

/* meta - keywords - mod - start */

$this->data['entry_meta_keywords'] = $this->language->get('entry_meta_keywords');

/* meta - keywords - mod - end */

мотаем вниз (примерно до 328 строки)

после

if (isset($this->request->post['config_meta_description'])) {

$this->data['config_meta_description'] = $this->request->post['config_meta_description'];

} else {

$this->data['config_meta_description'] = $this->config->get('config_meta_description');

}

вставляем

/* meta - keywords - mod - start */

if (isset($this->request->post['config_meta_keywords'])) {

$this->data['config_meta_keywords'] = $this->request->post['config_meta_keywords'];

} else {

$this->data['config_meta_keywords'] = $this->config->get('config_meta_keywords');

}

/* meta - keywords - mod - end */

сохраняем, закрываем.

шаг #2

открываем

admin/language/LANG/setting/setting.php

после

$_['entry_meta_description'] = 'Meta Tag Description:';

вставляем

/* meta - keywords - mod - start */

$_['entry_meta_keywords'] = 'Meta Tag Keywords:';

/* meta - keywords - mod - end */

сохраняем, закрываем.

шаг #3

открываем

admin/view/template/setting/setting.tpl

после

<tr>

<td><?php echo $entry_meta_description; ?></td>

<td><textarea name="config_meta_description" cols="40" rows="5"><?php echo $config_meta_description; ?></textarea></td>

</tr>

вставляем

<!-- meta - keywords - mod - start //-->

<tr>

<td><?php echo $entry_meta_keywords; ?></td>

<td><textarea name="config_meta_keywords" cols="40" rows="5"><?php echo $config_meta_keywords; ?></textarea></td>

</tr>

<!-- meta - keywords - mod - end //-->

сохраняем, закрываем.

шаг #4

открываем

catalog/controller/common/header.php

перед

$this->data['keywords'] = $this->document->keywords;

вставляем

/* meta - keywords - mod - start */

if (empty($this->document->keywords)) {

$this->document->keywords = $this->config->get('config_meta_keywords');

}

/* meta - keywords - mod - end */

Link to comment
Share on other sites


  • 1 month later...
  • 2 weeks later...

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.