Sure, just take an Extension XML File, able to do it, then you see,
what is to be either
removed,
replaced, or
added, before or after the
Extension
Anchor Tag, looked for in the OC Source File, linked to this.
Then, insert the VqMod/OcMod Content directly into the corresponding Default File(s).
Just check the VqMod/OcMod Manuals on the Web, to find out in detail.
But you CANNOT hardcode a single FIXED Image Link into a Category File,
or it would exist on any other category Page as well.
Good Luck!
Ernie
---
Sample (OcMod!) Command Routine Lines:
Search in the
<file path="catalog/controller/product/category.php">
<search> for this
anchor tag/line ::
<?php if ($categories) { ?>
<add position="replace" index="1" offset="3">
meaning, 3 Lines (offset) BELOW the FIRST such Line (index='1')
---
Sample OcMod XML File - VqMod Files look a little different !
Code: Select all
<modification>
<name>Subcategory Images</name>
<code>subcategory-images</code>
<version>2.2</version>
<author>opencartarabic.com</author>
<link>http://www.opencartarabic.com</link>
------
LIKE IN THE :
<file path="catalog/controller/product/category.php">
<operation>
<search><![CDATA[
$data['categories'][] = array(
]]></search>
<add position="replace" index="1" offset="3"><![CDATA[
if ($result['image']) {
$image = $this->model_tool_image->resize($result['image'], 100, 100);
} else {
$image = $this->model_tool_image->resize('placeholder.png', 100, 100);
}
$data['categories'][] = array(
'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),
'thumb' => $image
);
]]></add>
</operation>
</file>
-----
AND IN THE :
-----
<file path="catalog/view/theme/*/template/product/category.tpl">
<operation>
<search><![CDATA[
<?php if ($categories) { ?>
]]></search>
<add position="replace" index="1" offset="25"><![CDATA[
<?php if ($categories) { ?>
<div class="col-sm-12">
<div>
<h3><?php echo $text_refine; ?></h3>
</div>
<div style="text-align: center;">
<div class="row">
<?php foreach ($categories as $category) { ?>
<div class="col-sm-2 col-xs-6" style="margin-bottom: 20px;">
<a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a>
<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
</div>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
]]></add>
</operation>
</file>
</modification>