Post by philbydevil » Sat Jan 28, 2012 9:43 am

Great mod! I was a bit surprised that the subcat images were removed from default in 1.5. Thanks!

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by webvet » Thu Feb 09, 2012 7:24 pm

Superb thread, superb mod!!!

Genuine, Honest Opencart Support @ http://webvetservices.com


User avatar
Active Member

Posts

Joined
Thu May 14, 2009 2:04 am
Location - Shropshire, UK

Post by SLD » Mon Feb 13, 2012 7:53 am

I've just upgraded to version 1.5.1.3 and like many, I'm surprised that the category thumbnails are gone.

I've followed the instructions in this thread, installed vqmod, copied the XML file from this thread and now get the following error:

Notice: Undefined variable: result in E:\domains\c\cravensfancydress.com\user\htdocs\vqmod\vqcache\vq2-catalog_controller_product_category.php on line 155

This is only on sub categories. The parent categories work fine.

Working category:
http://cravensfancydress.com/index.php? ... ry&path=35

Non working sub category:
http://cravensfancydress.com/index.php? ... path=35_68

The layout looks like it is corrupting in three ways:

1. The image for the category selected is displaying at the top. This is no doubt by design, so I can modify the PHP to remove it (I've seen a few posts on the forum, but won't change the code until the other issues are sorted out)
2. The Category list on the left is now expanding all categories (I think the error message is relating to this)
3. The product list is corrupt (I'm guessing this is caused by the XML / vqmod

I'd appreciate any help as this site is live.

thanks,

SLD

SLD
Newbie

Posts

Joined
Mon Sep 27, 2010 7:22 pm

Post by webvet » Mon Feb 13, 2012 8:58 pm

SLD

1. You are correct - this is the default way that Opencart functions. It displays the image for the category at the top of the list of products and/or subcategories. Can be removed, see the other posts you found.

2. The expansion of the lists shouldn't relate to this vqmod as it will only alter the files targeted by the vqmod. It doesn't affect the category module and so this shouldn't be altered?

3. How is your product list corrupt. Again, the results of the product list shouldn't be altered by the vqmod. It is only altering the way the .tpl file is displaying the subcategories - not the queries to find products.

In terms of your error - I think I had a similar result and changed the vqmod from:

Code: Select all

<operation>
                <search position="after"><![CDATA[
		'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
		]]></search>
	
		<add><![CDATA[
		, 'thumb' => $image]]>
		</add>
         </operation>
To:

Code: Select all

<operation>
		<search position="before"><![CDATA[
		'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
		]]></search>
		
		<add><![CDATA[
		'image' => $this->model_tool_image->resize($result['image'], 160, 170),
		]]></add>
	</operation>

Genuine, Honest Opencart Support @ http://webvetservices.com


User avatar
Active Member

Posts

Joined
Thu May 14, 2009 2:04 am
Location - Shropshire, UK

Post by SLD » Tue Feb 14, 2012 5:36 am

Hi Webvet,

Thanks for your help. Your code change has now removed the error from the page. It has also sorted out point 2 and point 3.

The problem now is that the subcat images have gone again.

My only xml file in vqmod xml directory is as follows:

Code: Select all

<modification>
<id>Display Subcat Images</id>
<version>1.0</version>
<vqmver>2.1</vqmver>
<author>Rob Horsfield</author>

<file name="catalog/view/theme/default/template/product/category.tpl">
<operation>
<search position="replace" 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 box-subcat">
			<?php foreach ($categories as $category) { ?>
			<div>
				<?php if ($category['thumb']) { ?>
				<div class="image"><a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a></div>
				<?php } ?>
				<div class="name subcatname"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div>
			</div>
			<?php } ?>
		</div>
	</div>
  </div>
  <?php } ?>]]></add>
</operation>	
</file>

<file name="catalog/controller/product/category.php">
<operation>
<search position="after"><![CDATA[$product_total = $this->model_catalog_product->getTotalProducts($data);]]></search>
<add><![CDATA[$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));]]></add>
</operation>	
If you look at this page:

http://cravensfancydress.com/index.php? ... ry&path=35

I'd like it to have the thumbnails for the sub categories, but I'm back to the text only links.

Any more ideas?

Thanks,

SLD

SLD
Newbie

Posts

Joined
Mon Sep 27, 2010 7:22 pm

Post by webvet » Wed Feb 15, 2012 6:21 pm

SLD

I've sent you a PM, :)

Genuine, Honest Opencart Support @ http://webvetservices.com


User avatar
Active Member

Posts

Joined
Thu May 14, 2009 2:04 am
Location - Shropshire, UK

Post by grgr » Wed Feb 15, 2012 6:30 pm

@ SLD

I've added this to the extension store, both vQmod and manual instructions. It's free, not paid for.

Click on link below.

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

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

Post by nitika » Thu Feb 16, 2012 3:39 pm

but where to put this xml file?

Newbie

Posts

Joined
Thu Nov 24, 2011 6:41 pm

Post by grgr » Thu Feb 16, 2012 4:30 pm

Install vQmod ( http://forum.opencart.com/viewtopic.php ... 87#p196942 ) and put xml file in the xml folder.

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

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

Post by oclvr » Mon Mar 05, 2012 11:52 am

after manual installation, when click subcategory, there is a error showing up:
Notice: Undefined variable: result in /home3/zlivecen/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 160

I went to look at line 160, it's:
$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));

New member

Posts

Joined
Mon Jul 18, 2011 5:59 am

Post by grgr » Mon Mar 05, 2012 3:35 pm

The only change to the code in the controller file is:

Code: Select all

$image = $this->model_tool_image->resize($result['image'], 60, 60);
Which shouldn't affect anything and then adding the thumb to the array:

Code: Select all

'thumb' => $image
Which shouldn't affect anything either.

You obviously have a vqmod affecting this file, you'll need to have a look through that to see what it is doing as the change above may have affected it.

I also suggest going back and checking the edit to the file didn't go wrong.

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

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

Post by matte2k » Thu Mar 08, 2012 4:50 am

After reading these 8 pages I'm pretty confused...
It seems to be a lot of tweaking to get the job done. (the job that should already be included in OC 1.5)
Is there an easy and painless way to fix this "litte" problem. I run 1.5.1.3 and just want it the way it was in 1.4.9.5.
No more. No less.
Im a beginner.

Active Member

Posts

Joined
Thu Mar 01, 2012 7:07 pm

Post by grgr » Thu Mar 08, 2012 5:54 am

Download and install vqmod (google it) and then click on my link below and download the Refine Category Images extension, unzip and upload the vqmod xml file to your server. Job done.

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

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

Post by matte2k » Thu Mar 08, 2012 8:05 pm

can't find any xml file in the extension?

Active Member

Posts

Joined
Thu Mar 01, 2012 7:07 pm

Post by grgr » Thu Mar 08, 2012 8:37 pm

matte2k wrote:can't find any xml file in the extension?
oh yeah, forgot about that!

I'll see about getting that done later.

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

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

Post by matte2k » Fri Mar 09, 2012 4:33 am

grgr wrote:
matte2k wrote:can't find any xml file in the extension?
oh yeah, forgot about that!

I'll see about getting that done later.

What is the xml file doing?
I uploaded the filesvin the extension folders an it seem to work.

Active Member

Posts

Joined
Thu Mar 01, 2012 7:07 pm

Post by grgr » Fri Mar 09, 2012 4:53 am

matte2k wrote:
grgr wrote:
matte2k wrote:can't find any xml file in the extension?
oh yeah, forgot about that!

I'll see about getting that done later.

What is the xml file doing?
I uploaded the filesvin the extension folders an it seem to work.
The files are there to upload as you have done. The manual instructions and now the vQmods are for those people that have previously altered these file.

vQmods now added.

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

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

Post by inspirio » Fri Mar 09, 2012 3:29 pm

Here is my webpage with little modification that i use from here:
http://lipnenski-bg.com/opencart/%D0%97 ... 0%BD%D0%B8

The category image work perfect. :)

Image


User avatar
New member

Posts

Joined
Fri Feb 17, 2012 9:11 pm

Post by Ozfarmer » Mon Mar 19, 2012 4:46 pm

Lovely Work! How do I make the images spread across the page?

Attachments

Capture.jpg

Capture.jpg (34.17 KiB) Viewed 5300 times


Active Member

Posts

Joined
Wed Aug 17, 2011 7:08 pm
Location - Australia

Post by philbydevil » Mon Mar 19, 2012 6:17 pm

View Source. And then see what box "Refine Search" and/or the category images are sitting in and then modify the width in the stylesheet.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am
Who is online

Users browsing this forum: gunownergear and 30 guests