Поиск сообщества
Показаны результаты для тегов 'вывод категории'.
Найдено: 1 результат
-
Приветствую! Хочется в категориях возле фото вывести категорию с ссылкой, может кто подскажет в какую сторону копать... версия opencart 2.0 Единственное что сделал так это вывод категории, и то это просто с хлебных крошек берет, заходишь в родительскую категорию показывает ту категорию.. \catalog\controller\product\category.php: $data['products'][] = array( 'thumb_swap' => $swapimage, 'hit' => $hit, 'viewed' => $result['viewed'], 'date_end' => $date_end, 'date_available' => $result['date_available'], 'options' => $options, 'quantity' => $result['quantity'], 'stock' => ($result['quantity']<=0) ? $result['stock_status'] : $this->language->get('text_instock'), 'sale' => $result['price'] == 0 ? 100 : round((($result['price'] - $result['special'])/$result['price'])*100, 0), 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'catname' => $category_info['name'], //Ну понимаю что это не правильно... 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get('config_product_description_length')) . '..', 'price' => $price, 'special' => $special, 'tax' => $tax, 'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1, 'rating' => $result['rating'], 'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url) ); ну и вывел в категориях \template\product\category.tpl <?php echo $product['catname']; ?> Категория к товарам проставлена только одна, максимальный уровень вложения 3й (1==>2==>3)