$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(
/* by javacode */
//'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (0)' : ''),
'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_sub_category' => true,
'filter_filter' => $filter,
'sort' => $sort,
'order' => $order,
'start' => ($page - 1) * $limit,
'limit' => $limit
);
/* by javacode */
//$product_total = $this->model_catalog_product->getTotalProducts($filter_data);
$product_total = 0;
$results = $this->model_catalog_product->getProducts($filter_data);