Post by Goncharenko » Tue Mar 20, 2012 8:19 pm

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).

New member

Posts

Joined
Sun Mar 18, 2012 9:21 am

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


Web Developer ( & Firefighter)
Web Development, Web Content Management, Mobile Web Design, Android Apps

www.webdesign-plus.co.uk


New member

Posts

Joined
Mon Nov 14, 2011 5:20 pm
Location - United Kingdom

Post by Goncharenko » Mon Mar 26, 2012 7:21 pm

Tested on 1.5.2.1?

New member

Posts

Joined
Sun Mar 18, 2012 9:21 am

Post by grahamdek » Wed Mar 28, 2012 9:00 pm

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

User avatar
Newbie

Posts

Joined
Thu Mar 08, 2012 8:48 pm
Location - South Africa

Post by Jez D » Wed Mar 28, 2012 9:13 pm

Manual install? What did you install?

Web Developer ( & Firefighter)
Web Development, Web Content Management, Mobile Web Design, Android Apps

www.webdesign-plus.co.uk


New member

Posts

Joined
Mon Nov 14, 2011 5:20 pm
Location - United Kingdom

Post by grahamdek » Wed Mar 28, 2012 11:10 pm

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.

User avatar
Newbie

Posts

Joined
Thu Mar 08, 2012 8:48 pm
Location - South Africa

Post by grgr » Thu Mar 29, 2012 4:24 pm

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.

Image Image Image Image Image Image Image Image


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by Jez D » Thu Mar 29, 2012 8:28 pm

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


New member

Posts

Joined
Mon Nov 14, 2011 5:20 pm
Location - United Kingdom

Post by Baco » Fri Apr 20, 2012 5:28 am

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 ?

Newbie

Posts

Joined
Fri Apr 20, 2012 5:22 am

Post by jimmyharwood » Sat Apr 28, 2012 11:43 pm

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

New member

Posts

Joined
Thu Dec 29, 2011 12:55 am

Post by jimmyharwood » Sun Apr 29, 2012 6:00 am

I have resolved this, i ran the vqmod install again, problem sorted

New member

Posts

Joined
Thu Dec 29, 2011 12:55 am

Post by DannyMacD » Sat Jun 16, 2012 1:57 am

wow... 9 pages later...

is there a VQmod solution for 1.5.3.1?

Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am

Post by Jez D » Thu Jul 05, 2012 1:01 am

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


New member

Posts

Joined
Mon Nov 14, 2011 5:20 pm
Location - United Kingdom

Post by bojanglebeads » Thu Jul 19, 2012 6:39 pm

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

Newbie

Posts

Joined
Thu Jul 19, 2012 6:29 pm

Post by ThuNderGr » Thu Nov 22, 2012 3:57 pm

Does this mod work on 1.5.4.1?

Εστιατορια Αθηνα http://www.athensmenu.gr


Newbie

Posts

Joined
Fri Feb 03, 2012 5:08 pm

Post by andrejuseu » Tue Feb 19, 2013 4:41 am

ThuNderGr wrote:Does this mod work on 1.5.4.1?
Yes, just use http://forum.opencart.com/viewtopic.php ... 60#p268278 guide

CART.lt - custom opencart development, import and export systems, migrations to opencart


User avatar
New member

Posts

Joined
Fri Dec 23, 2011 7:36 pm

Post by ivanatap » Mon May 27, 2013 9:06 pm

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

Newbie

Posts

Joined
Mon May 27, 2013 8:55 pm

Post by djiz » Fri Oct 11, 2013 3:56 am

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) { ?>

New member

Posts

Joined
Tue May 26, 2009 5:05 pm

Post by dodokids » Wed Oct 30, 2013 9:48 pm

Is it possible to insert subcategorie images without resize?

New member

Posts

Joined
Mon Jul 30, 2012 6:50 pm

Post by grgr » Fri Nov 01, 2013 3:50 am

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).

Image Image Image Image Image Image Image Image


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK
Who is online

Users browsing this forum: No registered users and 55 guests