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

Recommended Posts

Доброго дня!

Необходимо исправить ошибку пагинации на сайте. Проблема икая:

Есть разгдел, например душевые уголки, реальных страниц 50. Но если вбивать в URL 51, 52, 53 и тд. - страницы открываются, отдают код 200.

Решением хотелось бы вигдеть: редирект на основную страницу разгдела, то есть вместо несуещёствуюещёй страницы пагинации dushevye_ugolki/?page=80, чтобы был редирект на   /dushevye_ugolki/

 

Спасипотому что.

 

OpencartPro 2.3.0.2.3

Шаблон Unishop

PHP 7+ (точной версии не знаю)

Edited by Santehdom
Link to comment
Share on other sites


2 часа назад, Santehdom сказал:

Доброго дня!

 

Обязательно тестируйте!

Можно попропотому чтовать ик, редирект на последнюю страницу пагинации:

if($product_total && ($page > ceil($product_total / $limit))) {
	$this->response->redirect($this->url->link('product/category', 'path=' . $category_id . '&page=' . ceil($product_total / $limit) . $url, true), 301);
} 

 

или ик, по игдее должно на первую 

if($product_total && ($page > ceil($product_total / $limit))) {
	$this->response->redirect($this->url->link('product/category', 'path=' . $category_id, true), 301);
} 

 

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.