I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
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
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>
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
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>
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
I've added this to the extension store, both vQmod and manual instructions. It's free, not paid for.
Click on link below.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
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'));
Code: Select all
$image = $this->model_tool_image->resize($result['image'], 60, 60);
Code: Select all
'thumb' => $image
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.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
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.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
oh yeah, forgot about that!matte2k wrote:can't find any xml file in the extension?
I'll see about getting that done later.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
grgr wrote:oh yeah, forgot about that!matte2k wrote:can't find any xml file in the extension?
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.matte2k wrote:grgr wrote:oh yeah, forgot about that!matte2k wrote:can't find any xml file in the extension?
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.
vQmods now added.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
http://lipnenski-bg.com/opencart/%D0%97 ... 0%BD%D0%B8
The category image work perfect.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Users browsing this forum: gunownergear and 30 guests