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

ruby

Newbie
  
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ruby's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. Может быть, это из за того, что на сайте не установлен ssl? Дело в том, что к примеру, на локальном сервере в шаблоне В header.php прописано условие if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) { $server = $this->config->get('config_ssl'); } else { $server = $this->config->get('config_url'); } $this->load->language('common/header'); $data['og_url'] = (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1')) ? HTTPS_SERVER : HTTP_SERVER) . substr($this->request->server['REQUEST_URI'], 1, (strlen($this->request->server['REQUEST_URI'])-1)); $data['og_image'] = $this->document->getOgImage(); В header.tpl она вызывается <a class="navbar-brand" href="<?=$home?>"> <?php if($home == $og_url): ?> На хостинге в header.php if ($this->request->server['HTTPS']) { $server = $this->config->get('config_ssl'); } else { $server = $this->config->get('config_url'); } Если её заменить в header.tpl на <?php if ($home == $base): ?> то все работает.
  2. Сайт на хостинге. При переходе с главной страницы на страницу какого-либо товара 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 в контроллере $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']);
Guest
×
  • 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.