UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
viewtopic.php?f=182&t=170030&p=645249#p645249
---
I only changed, in the VqMod below:
1. in the category.php Line:
'model' => $result['model'],
to:
'manufacturer' => $result['manufacturer'],
2. in the category.tpl Line:
<div>Model: <?php echo $product['model']; ?></div>
to:
<div>Manufacturer: <?php echo $product['manufacturer']; ?></div>
and it should function, just like on the OC v.2.2.x - themed image shown below!
Good Luck!
Ernie
VqMod: manufacturer_to_category.xml (tested on OpenCart v.2.2.x)
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<modification>
<id><![CDATA[Manufacturer Name in Category]]></id>
<version><![CDATA[1.0]]></version>
<vqmver><![CDATA[2.5.1]]></vqmver>
<author><![CDATA[Ernie - IP_CAM]]></author>
<file name="catalog/controller/product/category.php">
<operation error="log">
<search position="after"><![CDATA[$result['name'],]]></search>
<add><![CDATA[
'manufacturer' => $result['manufacturer'],
]]></add>
</operation>
</file>
<file name="catalog/view/theme/*/template/product/category.tpl">
<operation error="log">
<search position="after"><![CDATA[<div class="caption">]]></search>
<add><![CDATA[
<div>Manufacturer: <?php echo $product['manufacturer']; ?></div>
]]></add>
</operation>
</file>
</modification>
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
But download my latest VqMod, shown above, and make sure,
that NOT even a Single white space GAP exists, BEFORE:
<?xml version="1.0" encoding="UTF-8" ?>
It has been tested with a Default Theme OC v.2.2.x here:
http://www.jti.li
Good Luck
Ernie
BUT, to be honest, I believe to have seen this as a default optional Function somewhere in the admin Section.
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Thanks for your help, there is no such option in the admin.IP_CAM wrote:Never just mention 'AN ERROR' again, always inform, what error occurred, otherways, there is no help!
But download my latest VqMod, shown above, and make sure,
that NOT even a Single white space GAP exists, BEFORE:
<?xml version="1.0" encoding="UTF-8" ?>
It has been tested with a Default Theme OC v.2.2.x here:
http://www.jti.li
Good Luck
Ernie
BUT, to be honest, I believe to have seen this as a default optional Function somewhere in the admin Section.
It works good! Is it possible to make it work in the search page? manufacturer page? specials? featured?
Thank you Very Much
search Section, as I just checked on.
You then only have to change the VqMod Content, from:
Code: Select all
<file name="catalog/controller/product/category.php">
Code: Select all
<file name="catalog/controller/product/search.php">
Code: Select all
<file name="catalog/view/theme/*/template/product/category.tpl">
Code: Select all
<file name="catalog/view/theme/*/template/product/search.tpl">
It's always the xxx.tpl file, in the Theme/template/... Section, in connection with it's xxx.php file, in the corresponding controller/... Section, required, to make such work!
Technically, you could add all the different Routines into one single VqMod,
or then, create one for each Task. I did not check on other Files, but at least
some of them could be 'handled' the same way, to make this Function visible,
I assume!
Good Luck
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
this VqMod works, as shown on the image below.
Good Luck!
Ernie
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<modification>
<id><![CDATA[Manufacturer Name in Category]]></id>
<version><![CDATA[1.0]]></version>
<vqmver><![CDATA[2.5.1]]></vqmver>
<author><![CDATA[Ernie - IP_CAM]]></author>
<file name="catalog/controller/product/category.php">
<operation error="log">
<search position="after"><![CDATA[$result['name'],]]></search>
<add><![CDATA[
'manufacturer' => $result['manufacturer'],
]]></add>
</operation>
</file>
<file name="catalog/view/theme/*/template/product/category.tpl">
<operation error="log">
<search position="after"><![CDATA[<?php echo $product['name']; ?></a></h4>]]></search>
<add><![CDATA[
<div>Manufacturer: <?php echo $product['manufacturer']; ?></div>
]]></add>
</operation>
</file>
</modification>
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Users browsing this forum: No registered users and 106 guests