Page 9 of 10

Re: 1.5 Subcategory Images

Posted: Tue Mar 20, 2012 8:19 pm
by Goncharenko
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).

Re: 1.5 Subcategory Images

Posted: Fri Mar 23, 2012 10:53 am
by Jez D

Re: 1.5 Subcategory Images

Posted: Mon Mar 26, 2012 7:21 pm
by Goncharenko
Tested on 1.5.2.1?

Re: 1.5 Subcategory Images

Posted: Wed Mar 28, 2012 9:00 pm
by grahamdek
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

Re: 1.5 Subcategory Images

Posted: Wed Mar 28, 2012 9:13 pm
by Jez D
Manual install? What did you install?

Re: 1.5 Subcategory Images

Posted: Wed Mar 28, 2012 11:10 pm
by grahamdek
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):
$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.

Re: 1.5 Subcategory Images

Posted: Thu Mar 29, 2012 4:24 pm
by grgr
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.

Re: 1.5 Subcategory Images

Posted: Thu Mar 29, 2012 8:28 pm
by Jez D
Goncharenko wrote:
Tested on 1.5.2.1?
Not yet

Re: 1.5 Subcategory Images

Posted: Fri Apr 20, 2012 5:28 am
by Baco
How to paginate in parrent category ?
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 ?

Re: 1.5 Subcategory Images

Posted: Sat Apr 28, 2012 11:43 pm
by jimmyharwood
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

Re: 1.5 Subcategory Images

Posted: Sun Apr 29, 2012 6:00 am
by jimmyharwood
I have resolved this, i ran the vqmod install again, problem sorted

Re: 1.5 Subcategory Images

Posted: Sat Jun 16, 2012 1:57 am
by DannyMacD
wow... 9 pages later...

is there a VQmod solution for 1.5.3.1?

Re: 1.5 Subcategory Images

Posted: Thu Jul 05, 2012 1:01 am
by Jez D
Goncharenko wrote:
Tested on 1.5.2.1?
Yes

Re: 1.5 Subcategory Images

Posted: Thu Jul 19, 2012 6:39 pm
by bojanglebeads
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

Re: 1.5 Subcategory Images

Posted: Thu Nov 22, 2012 3:57 pm
by ThuNderGr
Does this mod work on 1.5.4.1?

Re: 1.5 Subcategory Images

Posted: Tue Feb 19, 2013 4:41 am
by andrejuseu
ThuNderGr wrote:Does this mod work on 1.5.4.1?
Yes, just use http://forum.opencart.com/viewtopic.php ... 60#p268278 guide

Re: 1.5 Subcategory Images

Posted: Mon May 27, 2013 9:06 pm
by ivanatap
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:

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

Re: 1.5 Subcategory Images

Posted: Fri Oct 11, 2013 3:56 am
by djiz
Great VQMOD works perfect on my site 1.5.5.1 only thing I wanted to see how to do it how can we make it go across after 5 categories

I Know this Is Removed but I don't know how to re implemented back in can someone help me out please thank you

Code: Select all

<?php if (count($categories) <= 5) { ?>

Re: 1.5 Subcategory Images

Posted: Wed Oct 30, 2013 9:48 pm
by dodokids
Is it possible to insert subcategorie images without resize?

Re: 1.5 Subcategory Images

Posted: Fri Nov 01, 2013 3:50 am
by grgr
dodokids wrote:Is it possible to insert subcategorie images without resize?
With difficulty.

Why would you want to do this? Resized images are reused so it only does it once (until you clear the cache).