@Radiss

Почему не подключается шаблон отдельной карточки товара?

Сайт на хостинге. При переходе с главной страницы на страницу какого-либо товара error

Not Found
The requested URL /macbook was not found on this server.

Apache/2.4.10 (Unix) Server at x95345lc.beget.tech Port 80

На локальном сервере все работает.

product.php в контроллере

spoiler
$data['breadcrumbs'][] = array(
				'text' => $product_info['name'],
				'href' => $this->url->link('product/product', $url . '&product_id=' . $this->request->get['product_id'])
			);

$this->document->addLink($this->url->link('product/product', 

public function review() {
		$this->load->language('product/product');

		$this->load->model('catalog/review');

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

		if (isset($this->request->get['page'])) {
			$page = $this->request->get['page'];
		} else {
			$page = 1;
		}

		$data['reviews'] = array();

		$review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);

		$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);

		foreach ($results as $result) {
			$data['reviews'][] = array(
				'author'     => $result['author'],
				'text'       => nl2br($result['text']),
				'rating'     => (int)$result['rating'],
				'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added']))
			);
		}

		$pagination = new Pagination();
		$pagination->total = $review_total;
		$pagination->page = $page;
		$pagination->limit = 5;
		$pagination->url = $this->url->link('product/product/review', 'product_id=' . $this->request->get['product_id'] . '&page={page}');

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

		$data['results'] = sprintf($this->language->get('text_pagination'), ($review_total) ? (($page - 1) * 5) + 1 : 0, ((($page - 1) * 5) > ($review_total - 5)) ? $review_total : ((($page - 1) * 5) + 5), $review_total, ceil($review_total / 5));

		$this->response->setOutput($this->load->view('product/review', $data));
	}


шаблон карточки продукта product.tpl (catalog\view\theme\site\template)

123

content_top (catalog\controller\common)

if ($route == 'product/product' && isset($this->request->get['product_id'])) {
			$this->load->model('catalog/product');

			$layout_id = $this->model_catalog_product->getProductLayoutId($this->request->get['product_id']);


Может быть, это из за того, что на сайте не установлен ssl?

В консоли errors

index.php?route=common/home:1 GET x95345lc.site.tech/index.php?route=common/home 500 (Internal Server Error)
macbook:1 GET x95345lc.site.tech/macbook 404 (Not Found)
2index.php?route=common/home:1 GET x95345lc.site.tech/index.php?route=common/home 500 (Internal Server Error)
2macbook:1 GET x95345lc.site.tech/macbook 404 (Not Found)
product.tpl:1 GET x95345lc.site.tech/product.tpl 404 (Not Found)
3macbook:1 GET x95345lc.site.tech/macbook 404 (Not Found)
2macbook:1 Unchecked runtime.lastError: The message port closed before a response was received.
canon-eos-5d:1 GET x95345lc.site.tech/canon-eos-5d 404 (Not Found)
hp-lp3065:1 GET x95345lc.site.tech/hp-lp3065 404 (Not Found)
  • Вопрос задан
  • 83 просмотра
Пригласить эксперта
Ответы на вопрос 2
whillson
@whillson
помогу, чем смогу ^_^
Конфиги правили при переносе?
Ответ написан
Комментировать
zoozag
@zoozag
Opencart
.htaccess переименовали?
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы