Немного разобрался. В контроллере категорий дописал после этого:
foreach ($results as $result) {
вот это:
$this->data['kolvo'] = $result['quantity'];
$this->data['weight'] = $result['weight'];
$this->data['weight_class_id'] = $result['weight_class_id'];
Но теперь возникла проблема с тем, что для всех товаров выводится кол-во и вес последнего товара. Пока не понял почему.
Вот код из контроллера:
foreach ($results as $result) {
if ($result['image']) {
$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
} else {
$image = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
}
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_tax')) {
$tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price']);
} else {
$tax = false;
}
if ($this->config->get('config_review_status')) {
$rating = (int)$result['rating'];
} else {
$rating = false;
}
/****************************сколько****************************/
$this->data['quantity'] = $result['quantity'];
/****************************сколько****************************/
/******************************вес******************************/
$this->data['weight'] = $result['weight'];
$this->data['weight_class_id'] = $result['weight_class_id'];
/******************************вес******************************/
$this->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, 300) . '..',
'price' => $price,
'special' => $special,
'tax' => $tax,
'rating' => $result['rating'],
/****************************сколько****************************/
'quantity' => $result['quantity'],
/****************************сколько****************************/
/******************************вес******************************/
'weight' => $result['weight'],
'weight_class_id' => $result['weight_class_id'],
/******************************вес******************************/
'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
);
}