Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Не открываются страницы с категориями


OldOrion

Recommended Posts

Всем привет! Столкнулся с непоильной мне проблемой и прошу вашей помощи.

 

Поставил ocStore 2.3.0.2.3

 

Добавил несколько категорий и товаров. Все страницы (главная, результаты поиска, категории, страница товара) отображаются отлично.

 

Но после того, как поставил шаблон So Market v1.3.1 началась какая-то чертовщина со страницами категорий. При попытке обратиться к категории, в которой есть хоть какой-то товар, мне выдает:

 

84bfe7d8ddc2.jpg

 

При этом главная страница работает. Так же все нормально выглядит, если я захочу открыть страницу категории, где нет ни одного товара:

 

34244dee6059.jpg

 

Но как только я добавлю какой-то товар в эту "пустую" категорию, то она так же становится недоступной.

 

Если искать товар через поиск, то он находится и прекрасно открывается:

 

c2eb02041d87.jpg

 

ЧПУ как для категорий, так и для товаров прописано.

 

Заранее спасибо за советы!

Надіслати
Поділитися на інших сайтах


1 час назад, OldOrion сказал:

...

 

Читайте лог ошибок. Обычно проблема в контроллере catalog/controller/product/category.php (если тема модифицирует его) и или страница вывода catalog/view/theme/so_market/template/product/category.tpl

 

Возможно так же если ошибок нет, ошибки сервера, в BOM символе вначале файлов (обычно файлах переводов), или знаки '

Надіслати
Поділитися на інших сайтах

5 minutes ago, Eldaeron said:

 

Читайте лог ошибок. Обычно проблема в контроллере catalog/controller/product/category.php (если тема модифицирует его) и или страница вывода catalog/view/theme/so_market/template/product/category.tpl

 

Возможно так же если ошибок нет, ошибки сервера, в BOM символе вначале файлов (обычно файлах переводов), или знаки '

 

Скачал оба файла. Сохранил как просто UTF-8

 

Вот они:

catalog/controller/product/category.php

Spoiler

<?php
class ControllerProductCategory extends Controller {
	public function index() {
		$this->load->language('product/category');

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

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

		$this->load->model('tool/image');

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

		if (isset($this->request->get['sort'])) {
			$sort = $this->request->get['sort'];
		} else {
			$sort = 'p.sort_order';
		}

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

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

		if (isset($this->request->get['limit'])) {
			$limit = (int)$this->request->get['limit'];
		} else {
			$limit = $this->config->get($this->config->get('config_theme') . '_product_limit');
		}

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

		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_home'),
			'href' => $this->url->link('common/home')
		);

		if (isset($this->request->get['path'])) {
			$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'];
			}

			$path = '';

			$parts = explode('_', (string)$this->request->get['path']);

			$category_id = (int)array_pop($parts);

			foreach ($parts as $path_id) {
				if (!$path) {
					$path = (int)$path_id;
				} else {
					$path .= '_' . (int)$path_id;
				}

				$category_info = $this->model_catalog_category->getCategory($path_id);

				if ($category_info) {
					$data['breadcrumbs'][] = array(
						'text' => $category_info['name'],
						'href' => $this->url->link('product/category', 'path=' . $path . $url)
					);
				}
			}
		} else {
			$category_id = 0;
		}

		$category_info = $this->model_catalog_category->getCategory($category_id);

		if ($category_info) {

			if ($category_info['meta_title']) {
				$this->document->setTitle($category_info['meta_title']);
			} else {
				$this->document->setTitle($category_info['name']);
			}

			$this->document->setDescription($category_info['meta_description']);
			$this->document->setKeywords($category_info['meta_keyword']);

			if ($category_info['meta_h1']) {
				$data['heading_title'] = $category_info['meta_h1'];
			} else {
				$data['heading_title'] = $category_info['name'];
			}

			$data['text_refine'] = $this->language->get('text_refine');
			$data['text_empty'] = $this->language->get('text_empty');
			$data['text_quantity'] = $this->language->get('text_quantity');
			$data['text_manufacturer'] = $this->language->get('text_manufacturer');
			$data['text_model'] = $this->language->get('text_model');
			$data['text_price'] = $this->language->get('text_price');
			$data['text_tax'] = $this->language->get('text_tax');
			$data['text_points'] = $this->language->get('text_points');
			$data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
			$data['text_sort'] = $this->language->get('text_sort');
			$data['text_limit'] = $this->language->get('text_limit');

			$data['button_cart'] = $this->language->get('button_cart');
			$data['button_wishlist'] = $this->language->get('button_wishlist');
			$data['button_compare'] = $this->language->get('button_compare');
			$data['button_continue'] = $this->language->get('button_continue');
			$data['button_list'] = $this->language->get('button_list');
			$data['button_grid'] = $this->language->get('button_grid');

			// Set the last category breadcrumb
			$data['breadcrumbs'][] = array(
				'text' => $category_info['name'],
				'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'])
			);

			if ($category_info['image']) {
				$data['thumb'] = $this->model_tool_image->resize($category_info['image'], $this->config->get($this->config->get('config_theme') . '_image_category_width'), $this->config->get($this->config->get('config_theme') . '_image_category_height'));
				$this->document->setOgImage($data['thumb']);
			} else {
				$data['thumb'] = '';
			}

			$data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
			$data['compare'] = $this->url->link('product/compare');

			$url = '';

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

			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'];
			}

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

			$results = $this->model_catalog_category->getCategories($category_id);

			foreach ($results as $result) {
				$filter_data = array(
					'filter_category_id'  => $result['category_id'],
					'filter_sub_category' => true
				);

				$data['categories'][] = array(
					'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
					'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
				);
			}

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

			$filter_data = array(
				'filter_category_id' => $category_id,
				'filter_filter'      => $filter,
				'sort'               => $sort,
				'order'              => $order,
				'start'              => ($page - 1) * $limit,
				'limit'              => $limit
			);

			$product_total = $this->model_catalog_product->getTotalProducts($filter_data);

			$results = $this->model_catalog_product->getProducts($filter_data);

			foreach ($results as $result) {
				if ($result['image']) {
					$image = $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_product_width'), $this->config->get($this->config->get('config_theme') . '_image_product_height'));
				} else {
					$image = $this->model_tool_image->resize('placeholder.png', $this->config->get($this->config->get('config_theme') . '_image_product_width'), $this->config->get($this->config->get('config_theme') . '_image_product_height'));
				}

				if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
					$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
				} else {
					$price = false;
				}

				if ((float)$result['special']) {
					$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
				} else {
					$special = false;
				}

				if ($this->config->get('config_tax')) {
					$tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price'], $this->session->data['currency']);
				} else {
					$tax = false;
				}

				if ($this->config->get('config_review_status')) {
					$rating = (int)$result['rating'];
				} else {
					$rating = false;
				}

				$data['products'][] = array(
					'product_id'  => $result['product_id'],
					'thumb'       => $image,
					'name'        => $result['name'],
					'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',
					'price'       => $price,
					'special'     => $special,
					'tax'         => $tax,
					'minimum'     => ($result['minimum'] > 0) ? $result['minimum'] : 1,
					'rating'      => $rating,
					'href'        => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
				);
			}

			$url = '';

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

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

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

			$data['sorts'][] = array(
				'text'  => $this->language->get('text_default'),
				'value' => 'p.sort_order-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url)
			);

			$data['sorts'][] = array(
				'text'  => $this->language->get('text_name_asc'),
				'value' => 'pd.name-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=ASC' . $url)
			);

			$data['sorts'][] = array(
				'text'  => $this->language->get('text_name_desc'),
				'value' => 'pd.name-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=DESC' . $url)
			);

			$data['sorts'][] = array(
				'text'  => $this->language->get('text_price_asc'),
				'value' => 'p.price-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=ASC' . $url)
			);

			$data['sorts'][] = array(
				'text'  => $this->language->get('text_price_desc'),
				'value' => 'p.price-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=DESC' . $url)
			);

			if ($this->config->get('config_review_status')) {
				$data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_desc'),
					'value' => 'rating-DESC',
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=DESC' . $url)
				);

				$data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_asc'),
					'value' => 'rating-ASC',
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=ASC' . $url)
				);
			}

			$data['sorts'][] = array(
				'text'  => $this->language->get('text_model_asc'),
				'value' => 'p.model-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=ASC' . $url)
			);

			$data['sorts'][] = array(
				'text'  => $this->language->get('text_model_desc'),
				'value' => 'p.model-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=DESC' . $url)
			);

			$url = '';

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

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

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

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

			$limits = array_unique(array($this->config->get($this->config->get('config_theme') . '_product_limit'), 25, 50, 75, 100));

			sort($limits);

			foreach($limits as $value) {
				$data['limits'][] = array(
					'text'  => $value,
					'value' => $value,
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=' . $value)
				);
			}

			$url = '';

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

			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->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');

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

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

			// http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html
			if ($page == 1) {
			    $this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'], true), 'canonical');
			} elseif ($page == 2) {
			    $this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'], true), 'prev');
			} else {
			    $this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'] . '&page='. ($page - 1), true), 'prev');
			}

			if ($limit && ceil($product_total / $limit) > $page) {
			    $this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'] . '&page='. ($page + 1), true), 'next');
			}

			$data['sort'] = $sort;
			$data['order'] = $order;
			$data['limit'] = $limit;

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

			$data['column_left'] = $this->load->controller('common/column_left');
			$data['column_right'] = $this->load->controller('common/column_right');
			$data['content_top'] = $this->load->controller('common/content_top');
			$data['content_bottom'] = $this->load->controller('common/content_bottom');
			$data['footer'] = $this->load->controller('common/footer');
			$data['header'] = $this->load->controller('common/header');

			$this->response->setOutput($this->load->view('product/category', $data));
		} else {
			$url = '';

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

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

			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'];
			}

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

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

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

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

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

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

			$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found');

			$data['column_left'] = $this->load->controller('common/column_left');
			$data['column_right'] = $this->load->controller('common/column_right');
			$data['content_top'] = $this->load->controller('common/content_top');
			$data['content_bottom'] = $this->load->controller('common/content_bottom');
			$data['footer'] = $this->load->controller('common/footer');
			$data['header'] = $this->load->controller('common/header');

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

 

 

catalog/view/theme/so_market/template/product/category.tpl

Spoiler

<?php echo $header; ?>

<?php
//Variables Category
$devices = array('lg' => ' Desktops','md' => ' Desktops','sm' => ' Tablets','xs' => ' Phones',);
$product_catalog_refine_col_lg = isset($product_catalog_refine_col_lg) ? $product_catalog_refine_col_lg : '';
$product_catalog_refine_col_md = isset($product_catalog_refine_col_md) ? $product_catalog_refine_col_md : '';
$product_catalog_refine_col_sm = isset($product_catalog_refine_col_sm) ? $product_catalog_refine_col_sm : '';
$product_catalog_refine_col_xs = isset($product_catalog_refine_col_xs) ? $product_catalog_refine_col_xs : '';
$product_catalog_column_lg = isset($product_catalog_column_lg) ? $product_catalog_column_lg : '';
$product_catalog_column_md = isset($product_catalog_column_md) ? $product_catalog_column_md : '';
$product_catalog_column_sm = isset($product_catalog_column_sm) ? $product_catalog_column_sm : '';
$product_catalog_column_xs = isset($product_catalog_column_xs) ? $product_catalog_column_xs : '';

$soconfig_pages  = array(
	'product_catalog_refine_col_lg'=>$product_catalog_refine_col_lg,
	'product_catalog_refine_col_md'=>$product_catalog_refine_col_md,
	'product_catalog_refine_col_sm'=>$product_catalog_refine_col_sm,
	'product_catalog_refine_col_xs'=>$product_catalog_refine_col_xs,
	'product_catalog_column_lg'=>$product_catalog_column_lg,
	'product_catalog_column_md'=>$product_catalog_column_md,
	'product_catalog_column_sm'=>$product_catalog_column_sm,
	'product_catalog_column_xs'=>$product_catalog_column_xs,
);

$short_by = !empty ($pagination) ? 'col-md-6 col-sm-8 col-xs-12' : 'col-md-10 col-sm-12';

/*CHECK COOKIE LISTINGTYPE*/	
if(isset($_COOKIE["listingType"])) $listingType = $_COOKIE["listingType"];
else $listingType =  isset($product_catalog_mode) && $product_catalog_mode ? 'list' : 'grid';
?>
<div class="container">
	 <!-- BREADCRUMB -->
	<ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>
	<div class="row">
	<?php echo $column_left; ?>
    <?php if ($column_left && $column_right) { ?>
    <?php $class = 'col-md-6 col-sm-4'; ?>
    <?php } elseif ($column_left || $column_right) { ?>
    <?php $class = 'col-sm-8 col-md-9 col-xs-12'; ?>
    <?php } else { ?>
    <?php $class = 'col-sm-12'; ?>
    <?php } ?>
	
    <div id="content" class="<?php echo $class; ?>">
        <div class="products-category">
			<!--// Begin  Today Deals-->
			<?php if ($products) {
					$special_info = 0;
					foreach ($products as $product) {($product['special'] != false) ? $special_info ++ : '';};
					if($special_info && $deals_today) :
						if (file_exists(DIR_TEMPLATE . $theme . '/template/soconfig/category_deals.tpl')) {
							include(DIR_TEMPLATE.$theme.'/template/soconfig/category_deals.tpl');
						}else echo 'Not found';
					endif;
				}
			?>
			
			<?php if ($thumb || $description !='<p><br></p>'): ?>
			<div class="form-group clearfix">
				<h3 class="title-category"><?php echo $heading_title; ?></h3> 
				<?php if($lstimg_cate_status):?>
				<div class="category-info ">
					<?php if ($description): ?>
					<div class="form-group ">
						<?php echo $description; ?>
					<?php endif; ?>
					</div>
				</div>
				<?php endif;?>
			</div>
			<?php endif; ?>
			
			<?php if (isset($product_catalog_refine) && $product_catalog_refine !='2' && $categories) { ?>
			<div class="refine-search form-group">
				<div class="row">
					<h3 class="col-xs-12 title-category"><?php echo $text_refine; ?></h3>
					<?php
					$device_refine ='form-group ';
					foreach ($devices as $refine => $device) {
						if(isset($soconfig_pages["product_catalog_refine_col_".$refine]) && $soconfig_pages["product_catalog_refine_col_".$refine] !=''){
							if((12%$soconfig_pages["product_catalog_refine_col_".$refine]) == '0'){
								$device_refine .=  'col-'.$refine.'-'.(12/$soconfig_pages["product_catalog_refine_col_".$refine] ).' ';
							}else{
								$device_refine .=  'col-'.$refine.'-15'.' ';
							}
						}
					}
					foreach ($categories as $category) {
						?>
						<div class="<?php echo $device_refine;?>">
						 <?php if ($product_catalog_refine ){?>
								<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
							  
						 <?php }else{?>
								<a href="<?php echo $category['href']; ?>" class="thumbnail"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /> </a>
								<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
						 <?php }?>
						</div>
					<?php } ?>
				</div>
			</div>
			<?php } ?>
			
			<?php echo $content_top; ?>
			
			<!--// Begin Select Category Simple -->
			<?php 
				if (file_exists(DIR_TEMPLATE . $theme . '/template/soconfig/category_grid.tpl')) include(DIR_TEMPLATE.$theme.'/template/soconfig/category_grid.tpl');
				else include(DIR_TEMPLATE.'default/template/soconfig/category_grid.tpl');
			?>
				
			<?php if (!$products) { ?>
				<div class="form-group">
					<h4><?php echo $text_empty; ?></h4>
					<div class="buttons">
						<div class="pull-right"><a href="<?php echo $continue; ?>" class="btn btn-primary"><?php echo $button_continue; ?></a></div>
					</div>
				</div>
			<?php } ?>
			<!--End content-->
		
		<script type="text/javascript"><!--
		 $('.view-mode .list-view button').bind("click", function() {
			if ($(this).is(".active")) {return false;}
			$.cookie('listingType', $(this).is(".grid") ? 'grid' : 'list', { path: '/' });
			location.reload();
		});
		//--></script> 
		
		<?php echo $content_bottom; ?>
		</div>
    </div>
	  
    <?php echo $column_right; ?></div>
</div>
<?php echo $footer; ?>

 

 

Надіслати
Поділитися на інших сайтах


25 minutes ago, Eldaeron said:

 

Читайте лог ошибок.

 

Из админки "Журнал ошибок":

Spoiler

2017-08-16 20:02:56 - PHP Notice:  Undefined variable: new in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 6
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_new in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 6
2017-08-16 20:02:56 - PHP Notice:  Undefined index: edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined index: download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined index: edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined index: download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined index: edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined index: download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined index: edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined index: download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined index: edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined index: download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined index: edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_edit in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 96
2017-08-16 20:02:56 - PHP Notice:  Undefined index: download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97
2017-08-16 20:02:56 - PHP Notice:  Undefined variable: button_download in /home/d/dmitrymn/decor-bazar.ru/public_html/system/storage/modification/admin/view/template/extension/modification.tpl on line 97

 

Надіслати
Поділитися на інших сайтах


55 minutes ago, Eldaeron said:

 

Читайте лог ошибок.

 

Включил отображение ошибок. И вот что мне пишет на странице категории, где нет товаров:

 

Quote

Н1 для категории dzhakuzi

Notice: Undefined variable: lstimg_cate_status in /home/d/dmitrymn/decor-bazar.ru/public_html/catalog/view/theme/so-market/template/product/category.tpl on line 66
Notice: Undefined variable: theme in /home/d/dmitrymn/decor-bazar.ru/public_html/catalog/view/theme/so-market/template/product/category.tpl on line 113Warning: include(/home/d/dmitrymn/decor-bazar.ru/public_html/catalog/view/theme/default/template/soconfig/category_grid.tpl): failed to open stream: No such file or directory in /home/d/dmitrymn/decor-bazar.ru/public_html/catalog/view/theme/so-market/template/product/category.tpl on line 114Warning: include(/home/d/dmitrymn/decor-bazar.ru/public_html/catalog/view/theme/default/template/soconfig/category_grid.tpl): failed to open stream: No such file or directory in /home/d/dmitrymn/decor-bazar.ru/public_html/catalog/view/theme/so-market/template/product/category.tpl on line 114Warning: include(): Failed opening '/home/d/dmitrymn/decor-bazar.ru/public_html/catalog/view/theme/default/template/soconfig/category_grid.tpl' for inclusion (include_path='/home/d/dmitrymn/decor-bazar.ru/public_html/system/library/so_social/src:.:/usr/share/php') in /home/d/dmitrymn/decor-bazar.ru/public_html/catalog/view/theme/so-market/template/product/category.tpl on line 114

В этой категории нет товаров.

 

Надіслати
Поділитися на інших сайтах


  • 8 months later...

Вот это да, теме уже почти год, а ошибка у меня точь в точь, только на другом шаблоне этого производителя: SO-MaxShop

Может кто еще попался на красивый дизайн шаблонов этого производителя и столкнулся с этим?

Симптомы - ошибки в category.tpl при создании категории / линия 108 / 109 / 125, а при добавлении в нее товаров вообще 500-ка

Вот и сам виовник category.tpl:

Спойлер

<?php echo $header; ?>

<?php
//Variables Category
$devices = array('lg' => ' Desktops','md' => ' Desktops','sm' => ' Tablets','xs' => ' Phones',);
$product_catalog_refine_col_lg = isset($product_catalog_refine_col_lg) ? $product_catalog_refine_col_lg : '';
$product_catalog_refine_col_md = isset($product_catalog_refine_col_md) ? $product_catalog_refine_col_md : '';
$product_catalog_refine_col_sm = isset($product_catalog_refine_col_sm) ? $product_catalog_refine_col_sm : '';
$product_catalog_refine_col_xs = isset($product_catalog_refine_col_xs) ? $product_catalog_refine_col_xs : '';
$product_catalog_column_lg = isset($product_catalog_column_lg) ? $product_catalog_column_lg : '';
$product_catalog_column_md = isset($product_catalog_column_md) ? $product_catalog_column_md : '';
$product_catalog_column_sm = isset($product_catalog_column_sm) ? $product_catalog_column_sm : '';
$product_catalog_column_xs = isset($product_catalog_column_xs) ? $product_catalog_column_xs : '';

$soconfig_pages  = array(
	'product_catalog_refine_col_lg'=>$product_catalog_refine_col_lg,
	'product_catalog_refine_col_md'=>$product_catalog_refine_col_md,
	'product_catalog_refine_col_sm'=>$product_catalog_refine_col_sm,
	'product_catalog_refine_col_xs'=>$product_catalog_refine_col_xs,
	'product_catalog_column_lg'=>$product_catalog_column_lg,
	'product_catalog_column_md'=>$product_catalog_column_md,
	'product_catalog_column_sm'=>$product_catalog_column_sm,
	'product_catalog_column_xs'=>$product_catalog_column_xs,
);

$short_by = !empty ($pagination) ? 'col-md-6 col-sm-8 col-xs-12' : 'col-md-10 col-sm-12';

/*CHECK COOKIE LISTINGTYPE*/	
if(isset($_COOKIE["listingType"])) $listingType = $_COOKIE["listingType"];
else $listingType =  isset($product_catalog_mode) && $product_catalog_mode ? 'list' : 'grid';
?>
<div class="container page-category">
	 <!-- BREADCRUMB -->
	<ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>
	<div class="row">
	<?php echo $column_left; ?>
    <?php if ($column_left && $column_right) { ?>
    <?php $class = 'col-md-6 col-sm-12'; ?>
    <?php } elseif ($column_left || $column_right) { ?>
    <?php $class = 'col-sm-12 col-md-9 col-xs-12'; ?>
    <?php } else { ?>
    <?php $class = 'col-sm-12'; ?>
    <?php } ?>
	
    <div id="content" class="<?php echo $class; ?>">
    	<?php if ($column_left){ ?>
		<a href="javascript:void(0)" class="open-leftsidebar hidden-lg hidden-md"><i class="fa fa-align-left"></i> Sidebar</a>
		<div class="sidebar-overlay left "></div>
		<?php } ?>
		<?php if ($column_right){ ?>
		<a href="javascript:void(0)" class="open-rightsidebar hidden-lg hidden-md"><i class="fa fa-align-right"></i> Sidebar</a>
		<div class="sidebar-overlay right "></div>
		<?php } ?>
        <div class="products-category">
			<!--// Begin  Today Deals-->
			<?php if ($products) {
					$special_info = 0;
					foreach ($products as $product) {($product['special'] != false) ? $special_info ++ : '';};
					if($special_info && $deals_today) :
						if (file_exists(DIR_TEMPLATE . $theme . '/template/soconfig/category_deals.tpl')) {
							include(DIR_TEMPLATE.$theme.'/template/soconfig/category_deals.tpl');
						}else echo 'Not found';
					endif;
				}
			?>
			

			
			<?php if (isset($product_catalog_refine) && $product_catalog_refine !='3' && $categories) { ?>
			<div class="refine-search form-group">
				<div class="row">
					
					<?php
					$device_refine ='form-group ';
					foreach ($devices as $refine => $device) {
						if(isset($soconfig_pages["product_catalog_refine_col_".$refine]) && $soconfig_pages["product_catalog_refine_col_".$refine] !=''){
							if((12%$soconfig_pages["product_catalog_refine_col_".$refine]) == '0'){
								$device_refine .=  'col-'.$refine.'-'.(12/$soconfig_pages["product_catalog_refine_col_".$refine] ).' ';
							}else{
								$device_refine .=  'col-'.$refine.'-15'.' ';
							}
						}
					}
					foreach ($categories as $category) {
						?>
						<div class="<?php echo $device_refine;?>">
						 <?php if ($product_catalog_refine ){?>
								<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
							  
						 <?php }else{?>
								<a href="<?php echo $category['href']; ?>" class="thumbnail"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /> </a>
								<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
						 <?php }?>
						</div>
					<?php } ?>
				</div>
			</div>
			<?php } ?>
			
			<?php echo $content_top; ?>
			
			<!--// Begin Select Category Simple -->
			<?php 
				if (file_exists(DIR_TEMPLATE . $theme . '/template/soconfig/category_grid.tpl')) include(DIR_TEMPLATE.$theme.'/template/soconfig/category_grid.tpl');
				else include(DIR_TEMPLATE.'default/template/soconfig/category_grid.tpl');
			?>
				
			<!--End content-->
		
		<script type="text/javascript"><!--
		 $('.view-mode .list-view button').bind("click", function() {
			if ($(this).is(".active")) {return false;}
			$.cookie('listingType', $(this).is(".grid") ? 'grid' : 'list', { path: '/' });
			location.reload();
		});
		//--></script> 
		
					<?php if ($thumb || $description !='<p><br></p>'): ?>
			<div class="form-group clearfix">
				<h3 class="title-category"><?php echo $heading_title; ?></h3> 
				<?php if($lstimg_cate_status):?>
				<div class="category-info row">
					<?php $short_by_category = ($thumb) ? 'col-sm-9 col-xs-12' : 'col-sm-12 col-xs-12'; ?>
					<?php if ($thumb): ?>
						<div class="img-cate col-sm-3 col-xs-12">
							<img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" title="<?php echo $heading_title; ?>" class=" media-object" />
						</div>
					<?php endif; ?>
				
					<?php if ($description): ?>
					<div class="form-group <?php echo $short_by_category;?>">
						<?php echo $description; ?>
					<?php endif; ?>
					</div>
				</div>
				<?php endif;?>
			</div>
			<?php endif; ?>
		
		<?php echo $content_bottom; ?>
		</div>
    </div>
	  
    <?php echo $column_right; ?></div>
</div>
<?php echo $footer; ?>

 

Строка 108:

if (file_exists(DIR_TEMPLATE . $theme . '/template/soconfig/category_grid.tpl')) include(DIR_TEMPLATE.$theme.'/template/soconfig/category_grid.tpl');

Строка 109:

else include(DIR_TEMPLATE.'default/template/soconfig/category_grid.tpl');

Строка 125

<?php if($lstimg_cate_status):?>

P.S. Техподдержка шаблона молчит - у них там пару месяцев бесплатной поддержки, а дальше как хотите или платите баксы :)

 

Змінено користувачем webmazahist666
Надіслати
Поділитися на інших сайтах


Ну вот, сам одну ошибку победил. В строке 109 ссылается на default шаблон, где нет этого файла. Поменял путь и ошибка пропала, а вот две другие (108 / 125) пока остались.

Есть у кого какие идеи?

Надіслати
Поділитися на інших сайтах


Это какой-то косяк у разработчика видимо. Проблема была решена перезаписью файлов с чистого Opencart 2. (Шаблон ставился с "быстрого старта")

 Может кому пригодится, кто еще поведется на "красивый дизайн" этого разработчика. Ух и пришлось же помучится с данным шаблоном (So MaxShop) - живого места не осталось от правок файлов и кривой установки любого дополнительного модуля.

 

P.S. Мой совет - не хотите головной боли, то покупайте русифицированные шаблоны, которые есть и на этом форуме. Если что и тех поддержка у них разберется, а тут придется все самому или доставать форумчан каждый день вопросами.

Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.