Jump to content
Sign in to follow this  
AMD

Не отображается категория после привязки к ней товара

Recommended Posts

Добрый вечер.


Версия магазина: ocStore 1.5.5.1.1

возился с чпу вроде все заработало но появилась ошибка.

Хостинг у хостера.

стоит эта тема http://mattio.katilina.ru/

 


После привязки товара к любой категории в категорию невозможно войти в браузере белый экран. в карточку товара можно попасть с главной страницы но в категорию попасть нельзя- белый экран. если отвязать товар от категории то категория открывается нормально.


 


на сайте ошибка PHP Notice:  Undefined index: name in /var/www/vh195737/data/www/xn--2040-93dxb8dtf8a.xn--p1ai/catalog/controller/module/categorytab.php on line 83


 


$this->data['tabs'][] = array(

'image' => $image,

'name' => $category_name['name'], -ошибка в этой строке (83) вероятно связано с чпу....

'href'           => $this->url->link('product/category', 'path=' . $tab['category_id']),

'title' => $tab['title'][$this->config->get('config_language_id')],

'products'       => $products

 

 


 


 

Спасибо.

 

 


Share this post


Link to post
Share on other sites

Если проблема с шаблоном,почему у автора не спросить????

Share this post


Link to post
Share on other sites

Если проблема с шаблоном,почему у автора не спросить????

 

думаю проблемы начались после выполнения этих запросов к бд

INSERT INTO url_alias (query, keyword) VALUES ('common/home', '');

INSERT INTO url_alias (query, keyword) VALUES ('account/wishlist', 'wishlist');

INSERT INTO url_alias (query, keyword) VALUES ('account/account', 'my-account');

INSERT INTO url_alias (query, keyword) VALUES ('checkout/cart', 'shopping-cart');

INSERT INTO url_alias (query, keyword) VALUES ('checkout/checkout', 'checkout');

INSERT INTO url_alias (query, keyword) VALUES ('account/login', 'login');

INSERT INTO url_alias (query, keyword) VALUES ('account/logout', 'logout');

INSERT INTO url_alias (query, keyword) VALUES ('account/order', 'order-history');

INSERT INTO url_alias (query, keyword) VALUES ('account/newsletter', 'newsletter');

INSERT INTO url_alias (query, keyword) VALUES ('product/special', 'specials');

INSERT INTO url_alias (query, keyword) VALUES ('affiliate/account', 'affiliates');

INSERT INTO url_alias (query, keyword) VALUES ('checkout/voucher', 'gift-vouchers');

INSERT INTO url_alias (query, keyword) VALUES ('product/manufacturer', 'brands');

INSERT INTO url_alias (query, keyword) VALUES ('information/contact', 'contact-us');

INSERT INTO url_alias (query, keyword) VALUES ('account/return/insert', 'request-return');

INSERT INTO url_alias (query, keyword) VALUES ('information/sitemap', 'sitemap');

INSERT INTO url_alias (query, keyword) VALUES ('account/forgotten', 'forgot-password');

INSERT INTO url_alias (query, keyword) VALUES ('account/download', 'downloads');

INSERT INTO url_alias (query, keyword) VALUES ('account/return', 'returns');

INSERT INTO url_alias (query, keyword) VALUES ('account/transaction', 'transactions');

INSERT INTO url_alias (query, keyword) VALUES ('account/register', 'create-account');

INSERT INTO url_alias (query, keyword) VALUES ('product/compare', 'compare-products');

INSERT INTO url_alias (query, keyword) VALUES ('product/search', 'search');

INSERT INTO url_alias (query, keyword) VALUES ('account/edit', 'edit-account');

INSERT INTO url_alias (query, keyword) VALUES ('account/password', 'change-password');

INSERT INTO url_alias (query, keyword) VALUES ('account/address', 'address-book');

INSERT INTO url_alias (query, keyword) VALUES ('account/reward', 'reward-points');

INSERT INTO url_alias (query, keyword) VALUES ('affiliate/edit', 'edit-affiliate-account');

INSERT INTO url_alias (query, keyword) VALUES ('affiliate/password', 'change-affiliate-password');

INSERT INTO url_alias (query, keyword) VALUES ('affiliate/payment', 'affiliate-payment-options');

INSERT INTO url_alias (query, keyword) VALUES ('affiliate/tracking', 'affiliate-tracking-code');

INSERT INTO url_alias (query, keyword) VALUES ('affiliate/transaction', 'affiliate-transactions');

INSERT INTO url_alias (query, keyword) VALUES ('affiliate/logout', 'affiliate-logout');

INSERT INTO url_alias (query, keyword) VALUES ('affiliate/forgotten', 'affiliate-forgot-password');

INSERT INTO url_alias (query, keyword) VALUES ('affiliate/register', 'create-affiliate-account');

INSERT INTO url_alias (query, keyword) VALUES ('affiliate/login', 'affiliate-login');

Share this post


Link to post
Share on other sites

Ошибка не связана с этим.

Share this post


Link to post
Share on other sites

Попробуйте отключите модуль categorytab. На сколько я понимаю это модуль выводящий категории в табах? В нем повидимому проблема. Не видя код модуля, ничего больше сказать не могу.

Share this post


Link to post
Share on other sites

вот код целиком  categorytab

 

<?php
class ControllerModulecategorytab extends Controller {
protected function index($setting) {
static $module = 0;
 
$this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/verticaltab.css');
 
$this->data['button_cart'] = $this->language->get('button_cart');
$this->data['template'] = $this->config->get('config_template');
 
// tab
$this->load->model('catalog/product');
$this->load->model('tool/image');
 
$this->data['tabs'] = array();
 
$tabs = array();
$tabs = $this->config->get('categorytab_tab');
 
if (isset($tabs)) {
foreach ($tabs as $tab) {
$data = array(
'filter_category_id' => $tab['category_id'],
'sort'  => 'pd.name',
'order' => 'ASC',
'start' => 0,
'limit' => $setting['limit']
);
 
$results = array();
$results = $this->model_catalog_product->getProducts($data);
 
$products = array();
 
foreach ($results as $result) {
if ($result['image']) {
$image = $this->model_tool_image->resize($result['image'], $setting['image_width'], $setting['image_height']);
} else {
$image = false;
}
 
if (($this->config->get('config_customer_price') && $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')));
} 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')));
} else {
$special = false;
}
 
if ($this->config->get('config_review_status')) {
$rating = $result['rating'];
} else {
$rating = false;
}
 
$products[] = array(
'product_id' => $result['product_id'],
'thumb'   => $image,
'name'     => $result['name'],
'price'   => $price,
'special' => $special,
'saving' => round((($result['price'] - $result['special'])/($result['price'] + 0.01))*100, 0),
'rating'     => $rating,
'reviews'    => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
'href'     => $this->url->link('product/product', 'product_id=' . $result['product_id']),
);
}
 
if ($tab['image']) {
$image = $this->model_tool_image->resize($tab['image'], $setting['image_category_width'], $setting['image_category_height']);
} else {
$image = false;
}
 
$category_name = $this->model_catalog_category->getCategory($tab['category_id']);
 
$this->data['tabs'][] = array(
'image' => $image,
'name' => $category_name['name'],
'href'           => $this->url->link('product/subcategory/category', 'path=' . $tab['category_id']),
'title' => $tab['title'][$this->config->get('config_language_id')],
'products'       => $products
);
}
}
// end tab
 
$this->data['module'] = $module++;
 
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/categorytab.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/categorytab.tpl';
} else {
$this->template = 'default/template/module/categorytab.tpl';
}
 
$this->render();
}
}
?>

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

проблема решилась переустановкой ocstore на версию 1.5.5.1.2 

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.