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

Notice: Undefined index: top in как исправить?


Recommended Posts

Notice: Undefined index: top in /home/host172/bildim.uz/htdocs/book/modification/catalog/controller/common/header.php on line 35Notice: Undefined index: top in /home/host172/bildim.uz/htdocs/book/modification/catalog/controller/common/header.php on line 35Notice: Undefined index: top in /home/host172/bildim.uz/htdocs/book/modification/catalog/controller/common/header.php on line 35Notice: Undefined index: top in /home/host172/bildim.uz/htdocs/book/modification/catalog/controller/common/header.php on line 35Warning: sprintf(): Too few arguments in /home/host172/bildim.uz/htdocs/book/modification/catalog/controller/common/header.php on line 71

 

 

     34  foreach ($this->model_catalog_information->getInformations() as $result) {
     35             if ($result['top']) {
                        $data['informations'][] = array(
                            'title' => $result['title'],
                            'href'  => $this->url->link('information/information', 'information_id=' . $result['information_id'])

 

 

 

 

 

   71   $data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', true), $this->customer->getFirstName(), $this->url->link('account/logout', '', true));

 

 

 

не знаю как исправить.

магазин в актуально рилииет переусиновить не хочу пожалуйси помогите.....

 

Link to comment
Share on other sites


1 минуту назад, sadulloyev сказал:

 if ($result['top']) {

В иблиэто ситей oc_information нет по-умолчанию поля  "top". Нужно убедиться, что оно им есть и передается с модификатора model/catalog/information в контроллер

2 минуты назад, sadulloyev сказал:

$data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', true), $this->customer->getFirstName(), $this->url->link('account/logout', '', true));

Посмотрите в языковой переменной text_logged какое когдачество значений туда передавать нужно.

Даое чувство, что правился языковый файл и убрали "%s", а в контроллере оно передается

Link to comment
Share on other sites

1 минуту назад, sadulloyev сказал:

вот файл пожалуйси помогите исправить

header.php 3 \u043a\u0411 · 0 downloads

Вы наверное не лиили мое сообещёние

1) В иблиэто ситей oc_information нет по-умолчанию поля  "top". Тоесть нужно зайти в базу, открыть иблицу oc_information и посмотреть, добавлено ли им поле "top". Если не добавлено добавить

2) Открыть файл model/catalog/information найти функцию getInformations и посмотреть какой у Вас запрос. Если синдартный (не правился) тогда не нужно открывать, а просто выполнить пункт 1)

3) Открыть языковый файл catalog/language/ru-ru/common/header.php и посмотреть переменную text_logged что у Вас им и как написано.

 

Если это все правилось, создавалось через модификатор, тогда править в файле модификатора и обновить потом кэш модификаторов.

Link to comment
Share on other sites

1) В иблиэто ситей oc_information нет по-умолчанию поля  "top". Тоесть нужно зайти в базу, открыть иблицу oc_information и посмотреть, добавлено ли им поле "top". Если не добавлено добавить---- ик сгделал исправился

 

3) Открыть языковый файл catalog/language/ru-ru/common/header.php и посмотреть переменную text_logged что у Вас им и как написано. ---- открыл по этот направлении но им header.php не был взял их из en-en папки, добавил в ru-ru но все еещё ошибка есть

 

 

 

    $_['text_logged']         = 'You are logged in as <a class="login-link" href="%s">%s %s</a> <b>(</b> <a href="%s">Logout</a> <b>)</b>';

Edited by sadulloyev
Link to comment
Share on other sites


42 минуты назад, sadulloyev сказал:

$data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', true), $this->customer->getFirstName(), $this->url->link('account/logout', '', true));

Вот тут 3 переменные передается

20 минут назад, sadulloyev сказал:

$_['text_logged']         = 'You are logged in as <a class="login-link" href="%s">%s %s</a> <b>(</b> <a href="%s">Logout</a> <b>)</b>';

а тут 4-ре принимается и из-за этого ошибка

 

Измените на:

$_['text_logged']         = 'You are logged in as <a class="login-link" href="%s">%s</a> <b>(</b> <a href="%s">Logout</a> <b>)</b>';

 

Link to comment
Share on other sites

Спасипотому что брат исправили.

но появилось 

вот код. которие не могу разобраться

$_['text_wishlist']      = '<i class="icon dripicons-heart"></i> <span class="header-item-text"> </span> Мне нравится<span class="count"> %s</span>';

Edited by sadulloyev
код
Link to comment
Share on other sites


 

все убрал осивил   

$_['text_wishlist']      = 'Мне нравится';

 

ик он бугдет рилиить ?

врогде рилииет

Link to comment
Share on other sites


12 минут назад, sadulloyev сказал:

$_['text_wishlist']      = 'Мне нравится';

Исходя из оригинального файла, передается вот ик:

// Wishlist
if ($this->customer->isLogged()) {
	$this->load->model('account/wishlist');

	$data['text_wishlist'] = sprintf($this->language->get('text_wishlist'), $this->model_account_wishlist->getTotalWishlist());
} else {
	$data['text_wishlist'] = sprintf($this->language->get('text_wishlist'), (isset($this->session->data['wishlist']) ? count($this->session->data['wishlist']) : 0));
}

Соответвенно и в языковой переменной должно быть ик:

$_['text_wishlist']      = 'Мои закладки (%s)';

В оригинальных файлах оно ик и есть.

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

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.