Для osStore 2.1.0.1.2 Скрываем категории без товара:
\catalog\controller\product\category.php
$qc = $this->model_catalog_product->getTotalProducts($filter_data);
if ($qc > 0 ) {
$data['categories'][] = array(
'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
'thumb' => $this->model_tool_image->resize($result['image'], 120, 120),
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);
}
\catalog\controller\module\category.php
$qc = $this->model_catalog_product->getTotalProducts($filter_data);
if ($qc > 0 ) {
$children_data[] = array(
'category_id' => $child['category_id'],
'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
);
}
В шапку добавлять не стал, поддтормаживает. Можно ручками отключить.