1.5 Subcategory Images
Re: 1.5 Subcategory Images
Is there any way of removing the sub cat image at the top within the sub categories themselves? 1.5.2.1 using custom theme (gentle).
- Goncharenko
- Posts: 13
- Joined: Sun Mar 18, 2012 1:21 am
Re: 1.5 Subcategory Images
Web Developer ( & Firefighter)
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
- Jez D
- Posts: 75
- Joined: Mon Nov 14, 2011 9:20 am
- Location: United Kingdom
Re: 1.5 Subcategory Images
When I do a manual install I get this error on the Refine Search results page, it shows the image but also shows the error together.
You can see it at http://www.definitivedesign.co.za/mall/ ... ry&path=65
The error is:
Notice: Undefined index: thumb in /home/definit1/public_html/mall/vqmod/vqcache/vq2-catalog_view_theme_default_template_product_category.tpl on line
I do have Fido-X Store Manager installed which uses a lot of Vqmods, if this is the case, is there a way around it?
Thanks
You can see it at http://www.definitivedesign.co.za/mall/ ... ry&path=65
The error is:
Notice: Undefined index: thumb in /home/definit1/public_html/mall/vqmod/vqcache/vq2-catalog_view_theme_default_template_product_category.tpl on line
I do have Fido-X Store Manager installed which uses a lot of Vqmods, if this is the case, is there a way around it?
Thanks
-

grahamdek - Posts: 17
- Joined: Thu Mar 08, 2012 12:48 pm
- Location: South Africa
Re: 1.5 Subcategory Images
Manual install? What did you install?
Web Developer ( & Firefighter)
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
- Jez D
- Posts: 75
- Joined: Mon Nov 14, 2011 9:20 am
- Location: United Kingdom
Re: 1.5 Subcategory Images
Sorry, the instructions are called Installation Manual, so I said install. What I meant was Manual File Update
I used this:
Edit: ../catalog/controller/product/category.php
Find (around line 136):
REPLACE WITH:
Save and upload.
Edit: ../catalog/view/theme/YOURTHEME/template/product/category.tpl
Find:
REPLACE WITH:
Save the file and upload.
I used this:
Edit: ../catalog/controller/product/category.php
Find (around line 136):
$product_total = $this->model_catalog_product->getTotalProducts($data); $this->data['categories'][] = array( 'name' => $result['name'] . ' (' . $product_total . ')', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url) ); }
REPLACE WITH:
$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 ); }
Save and upload.
Edit: ../catalog/view/theme/YOURTHEME/template/product/category.tpl
Find:
<?php if ($categories) { ?> <h2><?php echo $text_refine; ?></h2> <div class="category-list"> <?php if (count($categories) <= 5) { ?> <ul> <?php foreach ($categories as $category) { ?> <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li> <?php } ?> </ul> <?php } else { ?> <?php for ($i = 0; $i < count($categories);) { ?> <ul> <?php $j = $i + ceil(count($categories) / 4); ?> <?php for (; $i < $j; $i++) { ?> <?php if (isset($categories[$i])) { ?> <li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li> <?php } ?> <?php } ?> </ul> <?php } ?> <?php } ?> </div> <?php } ?>
REPLACE WITH:
<?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 } ?>
Save the file and upload.
-

grahamdek - Posts: 17
- Joined: Thu Mar 08, 2012 12:48 pm
- Location: South Africa
Re: 1.5 Subcategory Images
Sounds like there might be a vQmod within the store manager extension that is altering this file. See if you can find it and you might then need to integrate the above code into the vQmod.
-

grgr - Posts: 834
- Joined: Mon Mar 28, 2011 8:08 am
Re: 1.5 Subcategory Images
Goncharenko wrote:
Tested on 1.5.2.1?
Not yet
Web Developer ( & Firefighter)
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
- Jez D
- Posts: 75
- Joined: Mon Nov 14, 2011 9:20 am
- Location: United Kingdom
Re: 1.5 Subcategory Images
How to paginate in parrent category ?
p.s. Have a 30-50 subcategories whith images, add
text pages is displayed, but not paginated (in sys./libr./pagination.php wrote public $limit = 15;)
any ideas or this is bug ?
p.s. Have a 30-50 subcategories whith images, add
- Code: Select all
<div class="pagination"><?php echo $pagination; ?></div>
text pages is displayed, but not paginated (in sys./libr./pagination.php wrote public $limit = 15;)
any ideas or this is bug ?
- Baco
- Posts: 3
- Joined: Thu Apr 19, 2012 9:22 pm
Re: 1.5 Subcategory Images
I have recently updated to 1.5.3.1 and the sub cat xml has stopped working, strangely I have had a couple of xml stop working while others carry on quite merry, I have made some css changes to my site, but every thing is still in default.
I have cleared the vqmod cache, but no changes - any ideas?
Jimmy
I have cleared the vqmod cache, but no changes - any ideas?
Jimmy
- jimmyharwood
- Posts: 41
- Joined: Wed Dec 28, 2011 4:55 pm
Re: 1.5 Subcategory Images
I have resolved this, i ran the vqmod install again, problem sorted
- jimmyharwood
- Posts: 41
- Joined: Wed Dec 28, 2011 4:55 pm
Re: 1.5 Subcategory Images
wow... 9 pages later...
is there a VQmod solution for 1.5.3.1?
is there a VQmod solution for 1.5.3.1?
- DannyMacD
- Posts: 471
- Joined: Thu Jun 25, 2009 10:39 pm
Re: 1.5 Subcategory Images
Goncharenko wrote:
Tested on 1.5.2.1?
Yes
Web Developer ( & Firefighter)
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
- Jez D
- Posts: 75
- Joined: Mon Nov 14, 2011 9:20 am
- Location: United Kingdom
Re: 1.5 Subcategory Images
Hi there, I', trying to use this mod on the Sellegance theme, but when it's enabled I get the following message underneath the category images:
Notice: Undefined variable: j in /home/*mysite*/public_html/opencart/vqmod/vqcache/vq2-catalog_view_theme_sellegance_template_product_category.tpl on line 90Notice: Undefined variable: i in /home/*mysite*/public_html/opencart/vqmod/vqcache/vq2-catalog_view_theme_sellegance_template_product_category.tpl on line 90
I've tried to attach the sellegance category.tpl file that contains the variables this error refers to (but it was rejected so I can post separately if anyone has any ideas!). Any help would be greatly appreciated as Sellegance doesn't seem to allow for category images in its skinning options!
Steve
Notice: Undefined variable: j in /home/*mysite*/public_html/opencart/vqmod/vqcache/vq2-catalog_view_theme_sellegance_template_product_category.tpl on line 90Notice: Undefined variable: i in /home/*mysite*/public_html/opencart/vqmod/vqcache/vq2-catalog_view_theme_sellegance_template_product_category.tpl on line 90
I've tried to attach the sellegance category.tpl file that contains the variables this error refers to (but it was rejected so I can post separately if anyone has any ideas!). Any help would be greatly appreciated as Sellegance doesn't seem to allow for category images in its skinning options!
Steve
- bojanglebeads
- Posts: 2
- Joined: Thu Jul 19, 2012 10:29 am
Re: 1.5 Subcategory Images
ThuNderGr wrote:Does this mod work on 1.5.4.1?
Yes, just use viewtopic.php?f=20&t=34923&start=160#p268278 guide
Lithuanian Opencart Support Member
Lithuanian support @ OCLietuva.com
Lithuanian support @ OCLietuva.com
-

andrejuseu - Posts: 21
- Joined: Fri Dec 23, 2011 11:36 am
Re: 1.5 Subcategory Images
Hi all,
I have a problem with subcategory images and I hope that someone could help me. I use OC version 1.5.4.1 and I upload subcat_image.xml (you can see code bellow) file through vQmod, bat this module doesn't work properly because it doesn't show images. I view the source code of tha page and src of img tag is actualy empty. I think that $category['thumb'] doesn't work properly.
subcat_image.xml:
Does anyone know what is the problem?
Thanks,
I
I have a problem with subcategory images and I hope that someone could help me. I use OC version 1.5.4.1 and I upload subcat_image.xml (you can see code bellow) file through vQmod, bat this module doesn't work properly because it doesn't show images. I view the source code of tha page and src of img tag is actualy empty. I think that $category['thumb'] doesn't work properly.
subcat_image.xml:
- Code: Select all
<modification>
<id>Subcategory Images</id>
<version>1.0</version>
<vqmver>1.2.3</vqmver>
<author>vger.co.uk</author>
<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/*/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>
Does anyone know what is the problem?
Thanks,
I
- ivanatap
- Posts: 1
- Joined: Mon May 27, 2013 12:55 pm
Who is online
Users browsing this forum: Alexa [Bot], Artware, Bing [Bot], Exabot [Bot], Getting There, granddaddy, gregy1403, lloydmedley, oclvr, PaulCutcliffe, petrkalina, Pobb, soj47 and 96 guests



















