
thank you in advance for your cooperation.
Code: Select all
<file name="catalog/controller/product/category.php">
<operation>
<search position="replace" index="1" offset="6"><![CDATA[
$product_total = $this->model_catalog_product->getTotalProducts($data);
]]></search>
<add><![CDATA[
$product_total = $this->model_catalog_product->getTotalProducts($data);
$image = $this->model_tool_image->resize($result['image'], 60, 60);
$this->data['categories'][] = array(
'name' => $result['name'] . ' (' . $product_total . ')',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),
'thumb' => $image
);
}
]]></add>
</operation>
</file>
<file name="catalog/view/theme/default/template/product/category.tpl">
<operation>
<search position="replace" index="1" offset="22"><![CDATA[
<?php if ($categories) { ?>
]]></search>
<add><![CDATA[
<?php if ($categories) { ?>
<div class="box">
<div class="box-heading"><?php echo $text_refine; ?></div>
<div class="box-content">
<div class="box-product">
<?php foreach ($categories as $category) { ?>
<div>
<?php if ($category['thumb']) { ?>
<div class="image" style="text-align: center">
<a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a>
</div>
<?php } ?>
<div style="text-align: center"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div></div>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
]]></add>
</operation>
</file>
</modification>
Code: Select all
<?php if ($categories) { ?>
<div class="box">
Code: Select all
<?php if ($categories) { ?>
<div class="box" id="cat-head">
Code: Select all
#cat-head .box-product > div {
width: 85px
}
Users browsing this forum: No registered users and 30 guests