таков вопрос как сделать heading_title модуля ссылкой которая будет вести в категории ,?
вот код контроллера модуля !
<?php
class ControllerExtensionModuleFeaturedcarusel extends Controller {
public function index($setting) {
static $module = 0;
$this->load->language('extension/module/featuredcarusel');
if ($setting['displaytitle'] == '1') {
$data['heading_title'] = $setting['name'];
} else {
$data['heading_title'] = false;
}
$data['class'] = $setting['class'];
$data['items'] = $setting['items'];
$data['prodview'] = $setting['prodview'];
$this->document->addStyle('catalog/view/javascript/jquery/owl-carousel/owl.carousel.css');
$this->document->addStyle('catalog/view/javascript/jquery/owl-carousel/featuredcarusel.css');
$this->document->addScript('catalog/view/javascript/jquery/owl-carousel/owl.carousel.min.js');
$data['text_tax'] = $this->language->get('text_tax');
$data['text_more'] = $this->language->get('text_more');
$data['button_cart'] = $this->language->get('button_cart');
$data['button_wishlist'] = $this->language->get('button_wishlist');
$data['button_compare'] = $this->language->get('button_compare');
$this->load->model('catalog/product');
$this->load->model('tool/image');
$data['products'] = array();
if (!$setting['limit']) {
$setting['limit'] = 4;
}
if (!empty($setting['product'])) {
$products = array_slice($setting['product'], 0, (int)$setting['limit']);
foreach ($products as $product_id) {
$product_info = $this->model_catalog_product->getProduct($product_id);
if ($product_info) {
if ($product_info['image']) {
$image = $this->model_tool_image->resize($product_info['image'], $setting['width'], $setting['height']);
} else {
$image = $this->model_tool_image->resize('placeholder.png', $setting['width'], $setting['height']);
}
if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
} else {
$price = false;
}
if ((float)$product_info['special']) {
$special = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
} else {
$special = false;
}
if ($this->config->get('config_tax')) {
$tax = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price'], $this->session->data['currency']);
} else {
$tax = false;
}
if ($this->config->get('config_review_status')) {
$rating = $product_info['rating'];
} else {
$rating = false;
}
$data['products'][] = array(
'product_id' => $product_info['product_id'],
'thumb' => $image,
'name' => $product_info['name'],
'description' => utf8_substr(strip_tags(html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',
'price' => $price,
'special' => $special,
'tax' => $tax,
'rating' => $rating,
'href' => $this->url->link('product/product', 'product_id=' . $product_info['product_id'])
);
}
}
}
$data['module'] = $module++;
if ($data['products']) {
return $this->load->view('extension/module/featuredcarusel', $data);
}
}
}
а вот шаблон модуля
<?php if ($heading_title) { ?>
<div class="title"><h3 class="link_cat"><?php echo $heading_title; ?></h3></div>
<?php } ?>
<div id="prodcarousel<?php echo $module; ?>" class="owl-carousel productcarusel view<?php echo $prodview; ?> <?php echo $class; ?>">
<?php foreach ($products as $product) { ?>
<div class="item text-center product-layout">
<div class="product-thumb transition teslo">
<div class="image avalange_img"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive" /></a></div>
<div class="caption">
<!-- <h4><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h4>-->
<?php if ($prodview !=1 && $prodview !=2) { ?>
<p><?php echo $product['description']; ?></p>
<?php } ?>
<?php if ($product['rating']) { ?>
<div class="rating">
<?php for ($i = 1; $i <= 5; $i++) { ?>
<?php if ($product['rating'] < $i) { ?>
<span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
<?php } else { ?>
<span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
<?php } ?>
<?php } ?>
</div>
<?php } ?>
<?php if ($product['price']) { ?>
<!--<p class="price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>
<?php } ?>
<?php if ($product['tax']) { ?>
<span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
<?php } ?>
</p>-->
<?php } ?>
<h4 class="link_cat"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h4>
</div>
<!-- <div class="button-group">
<?php if ($prodview !=1 && $prodview !=3) { ?>
<button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>
<?php } else { ?>
<a href="<?php echo $product['href']; ?>"><i class="fa fa-arrow-circle-right"></i>
<span class="hidden-xs hidden-sm hidden-md"><?php echo $text_more; ?></span></a>
<?php } ?>
<button type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button>
<button type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button>
</div>-->
</div>
</div>
<?php } ?>
</div>
<script type="text/javascript"><!--
$('#prodcarousel<?php echo $module; ?>').owlCarousel({
items: <?php echo $items; ?>,
autoPlay: 3000,
navigation: true,
navigationText: ['<i class="fa fa-chevron-left fa-5x"></i>', '<i class="fa fa-chevron-right fa-5x"></i>'],
pagination: false
});
--></script>
Помогите ,я начинающий ! сам не могу пойму