Jump to content
Sign in to follow this  
dmitriykonev

[Решено {magic}] Фатальная ошибка при попытке зайти в товары!

Recommended Posts

OpenCart 1.5.3.1

Изменений много!

 

При переходе на страницы каталога возникает следующая ошибка:

PHP Fatal error: Class 'Pagination' not found in /home/y/youfash/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 345, referer: http://yourfashion-room.ru/

 

Очень нужна помощь!!!!

Share this post


Link to post
Share on other sites

вполне возможно, что не работает ЧПУ

Share this post


Link to post
Share on other sites

На хостинге написали, что ошибка в коде сайта!

Share this post


Link to post
Share on other sites

Что-нибудь ставили в последнее время через vqmod, связанное с пагинацией? Очистите папку vqcache. Проверьте наличие класса Pagination в оригинальном файле catalog\controller\product\category.php

Share this post


Link to post
Share on other sites

Кэш чистил! 

 

Вот, что в catalog\controller\product\category.php   со словом Pagination 

$this->data['limits'][] = array(
'text'  => 75,
'value' => 75,
'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=75')
);
 
$this->data['limits'][] = array(
'text'  => 100,
'value' => 100,
'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=100')
);
 
$url = '';
 
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
 
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
 
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
 
$pagination = new Pagination();
$pagination->total = $product_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');
 
$this->data['pagination'] = $pagination->render();
 
$this->data['sort'] = $sort;
$this->data['order'] = $order;
$this->data['limit'] = $limit;
 
$this->data['continue'] = $this->url->link('common/home');
 
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
$this->template = 'default/template/product/category.tpl';
}
 
$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);
 
$this->response->setOutput($this->render());
    } else {
$url = '';
 
if (isset($this->request->get['path'])) {
$url .= '&path=' . $this->request->get['path'];
}
 
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
 
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
 
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
 
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
 
$this->data['breadcrumbs'][] = array(
'text'      => $this->language->get('text_error'),
'href'      => $this->url->link('product/category', $url),
'separator' => $this->language->get('text_separator')
);
 
$this->document->setTitle($this->language->get('text_error'));
 
      $this->data['heading_title'] = $this->language->get('text_error');
 
      $this->data['text_error'] = $this->language->get('text_error');
 
      $this->data['button_continue'] = $this->language->get('button_continue');
 
      $this->data['continue'] = $this->url->link('common/home');
 
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
$this->template = $this->config->get

Share this post


Link to post
Share on other sites

Через vqmod ставил модуль, но не знаю связан он с пагинацией или нет!( не знаю что такое пагинация!?)

Share this post


Link to post
Share on other sites

Код в теги и под спойлер. Постраничная навигация. А в файле vqmod/vqcache/vq2-catalog_controller_product_category.php код

$pagination = new Pagination();
$pagination->total = $product_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');
 
$this->data['pagination'] = $pagination->render();

присутствует?

Share this post


Link to post
Share on other sites

вот что в vqmod/vqcache/vq2-catalog_controller_product_category.php

 

$pagination = new Pagination();
$pagination->total = $product_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');
 
$this->data['pagination'] = $pagination->render();
 
$this->data['sort'] = $sort;
$this->data['order'] = $order;
$this->data['limit'] = $limit;
 
$this->data['continue'] = $this->url->link('common/home');
 
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
$this->template = 'default/template/product/category.tpl';
}
 
$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);
 
$this->response->setOutput($this->render());
    } else {
$url = '';
 
if (isset($this->request->get['path'])) {
$url .= '&path=' . $this->request->get['path'];
}
 
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
 
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
 
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
 
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
 
$this->data['breadcrumbs'][] = array(
'text'      => $this->language->get('text_error'),
'href'      => $this->url->link('product/category', $url),
'separator' => $this->language->get('text_separator')
);
 
$this->document->setTitle($this->language->get('text_error'));
 
      $this->data['heading_title'] = $this->language->get('text_error');
 
      $this->data['text_error'] = $this->language->get('text_error');

Share this post


Link to post
Share on other sites

А вот это: "Код в теги и под спойлер. Постраничная навигация"   Не понимаю!

Share this post


Link to post
Share on other sites

В своих сообщениях прежде, чем вставить код нажмите на кнопку code.png Спойлер найдете под этой кнопкой ips_bbcode.png А последнее - ответ на ваш вопрос

 

не знаю что такое пагинация!?

:wink:

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
[spoiler]$pagination = new Pagination();
$pagination->total = $product_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');

$this->data['pagination'] = $pagination->render();

$this->data['sort'] = $sort;
$this->data['order'] = $order;
$this->data['limit'] = $limit;

$this->data['continue'] = $this->url->link('common/home');

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
$this->template = 'default/template/product/category.tpl';
}

$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);

$this->response->setOutput($this->render());
} else {
$url = '';

if (isset($this->request->get['path'])) {
$url .= '&path=' . $this->request->get['path'];
}

if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}

if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}

if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}

if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}

$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_error'),
'href' => $this->url->link('product/category', $url),
'separator' => $this->language->get('text_separator')
);

$this->document->setTitle($this->language->get('text_error'));

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

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

[/spoiler]

Так?

Share this post


Link to post
Share on other sites

почти...только [spoiler] и [/spoiler] нужно вынести за границы поля с кодом

вы модуль удалили?

Share this post


Link to post
Share on other sites

Всё сделал не помогает!?

Share this post


Link to post
Share on other sites

Вот последние ошибки в error_log:

95.79.36.127] PHP Fatal error:  Class 'Pagination' not found in /home/y/youfash/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 345, referer: http://yourfashion-room.ru/
[Sat Oct 05 12:13:58 2013] [error] [client 95.79.36.127] PHP Fatal error:  Class 'Pagination' not found in /home/y/youfash/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 345, referer: http://yourfashion-room.ru/
[Sat Oct 05 12:14:42 2013] [error] [client 95.79.36.127] PHP Fatal error:  Class 'Pagination' not found in /home/y/youfash/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 345, referer: http://yourfashion-room.ru/
[Sat Oct 05 12:14:48 2013] [error] [client 95.79.36.127] PHP Fatal error:  Class 'Pagination' not found in /home/y/youfash/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 345, referer: http://yourfashion-room.ru/
[Sat Oct 05 12:15:01 2013] [error] [client 95.79.36.127] PHP Fatal error:  Class 'Pagination' not found in /home/y/youfash/public_html/admin/controller/catalog/suppler.php on line 382, referer: http://yourfashion-room.ru/admin/index.php?route=module/alsopurchased&token=6998abdbcf05f96fb1c8fdfa464bbe5d

Share this post


Link to post
Share on other sites

А от какого модуля файл admin/controller/catalog/suppler.php?

Share this post


Link to post
Share on other sites

модуль Поставщики! 

Share this post


Link to post
Share on other sites

Он в конце, потому-что я его самым последним пробовал открыть!

Share this post


Link to post
Share on other sites

А у вас файл system\library\pagination.php имеется в наличии?

Share this post


Link to post
Share on other sites

Сделал откат файлов и базы от 3 октября и всё восстановилось! Теперь надо думать в чём была причина сбоя!

Share this post


Link to post
Share on other sites

class Pagination прописан только в файле, который я указал выше. Видимо вы его удалили или переписали.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

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.