Page 3 of 10
Re: 1.5 Subcategory Images
Posted: Sat Sep 03, 2011 8:42 am
by favfan
[removed]
Re: 1.5 Subcategory Images
Posted: Sat Sep 03, 2011 1:44 pm
by favfan
teratyke wrote:Hi
Here is my attempt at changing the display- there is a bit of extra css in there which isn't used in the default install.
This changes the list to divs and puts in the images.
Probably a much better way of doing this than I have here, but its the best I can manage - improvements welcome!
This is for 1.5.0.5
Thanks
Rob
FYI, this download is the one I'm using now on the site and I don't get the display error from my previous post/screenshot.
Re: 1.5 Subcategory Images
Posted: Mon Sep 05, 2011 12:13 am
by adamtowers
Hi,
This .XML works for me to a point, as I can see images for the refined search categories, although I am then unable to view any of my products.. Our site is live, so really keen to get this sorted...
I've been trawling through other posts, and so far have not been able to crack this one..
Any assistance really would be much appreciated!!!
I'm using a clean(ish) 1.5.1.1 version
Vqmod is installed...
Re: 1.5 Subcategory Images
Posted: Mon Sep 05, 2011 9:34 am
by AliceH
I must be missing something very obvious but I can't get this to work. I have vqmod installed. then I upload the file and nothing changes. What am I missing, I am not using the default theme but I have tried uploading file as is and editing it replacing default with my theme name. No joy either way, I am running oc 1.5.1.1
Thanks in advance,
Alice.
Re: 1.5 Subcategory Images
Posted: Mon Sep 05, 2011 12:35 pm
by Degsey
My problem is that I get the images of the subcategories working but I do not get any products in other categories showing.
Re: 1.5 Subcategory Images
Posted: Fri Sep 09, 2011 9:03 am
by Degsey
Is there any chance somebody will do a hard code change to the files for this as the VQMod is not working for me.
Re: 1.5 Subcategory Images
Posted: Fri Sep 09, 2011 4:16 pm
by Flap
I'm using OC 1.5.1.1 and this mod cause some troubles with product list and footer. So I recoded it. I hope it will help someone.
Code: Select all
<modification>
<id>Display Subcat Images</id>
<version>1.0</version>
<vqmver>1.1.0</vqmver>
<author>Rob Horsfield</author>
<file name="catalog/view/theme/default/template/product/category.tpl">
<operation>
<search position="replace" offset="24"><![CDATA[<h2><?php echo $text_refine; ?></h2>]]></search>
<add><![CDATA[
<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>
]]></add>
</operation>
</file>
<file name="catalog/controller/product/category.php">
<operation>
<search position="before"><![CDATA[
$this->data['categories'][] = array(
]]></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>
<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>
</file>
</modification>
Re: 1.5 Subcategory Images
Posted: Sat Sep 10, 2011 3:05 am
by Degsey
I thank for taking the time to reply but the code you just posted is what is available for download previously and still has the same no products showing in categories and footer going full page.
Re: 1.5 Subcategory Images
Posted: Sat Sep 10, 2011 6:49 am
by Degsey
Ok finally with some code tweaking I managed to get the file to work for me, it solves the products disappearing and the footer resizing when in sub cats.
This should work on the latest version of 1.5.1.2 and 1.5.1.1
Happy coding!
Re: 1.5 Subcategory Images
Posted: Sat Sep 10, 2011 10:25 am
by AliceH
Like I said, I must be missing something obvious and this is what I think it is. I can't seem to find specific instructions on where the file should be uploaded to. ie;does it go in root directory, vqmod directory, or somewhere else? loading in the wrong place would explain why it won't work.
Alice.
Re: 1.5 Subcategory Images
Posted: Sat Sep 10, 2011 10:37 am
by AliceH
I figured it out. of course it should go in the xml folder, I knew it was something obvious. I also had to edit to my theme. Cool it works. Big thanks to you clever guys who right these things.
Re: 1.5 Subcategory Images
Posted: Sat Sep 10, 2011 11:43 am
by aektsuke
Good post ... an excellent learning.
Re: 1.5 Subcategory Images
Posted: Sat Sep 10, 2011 11:43 pm
by okmarket
I like your Re: 1.5 Subcategory Images modification, but it's not ok after modificaion. I use v.1.5.1, but not vqmod, so would you like to give me your modification again through email box
sales@okmarket.com, thank you.
b.rgds
dAvid
Re: 1.5 Subcategory Images
Posted: Sun Sep 11, 2011 12:13 am
by Degsey
okmarket wrote:I like your Re: 1.5 Subcategory Images modification, but it's not ok after modificaion. I use v.1.5.1, but not vqmod, so would you like to give me your modification again through email box
sales@okmarket.com, thank you.
b.rgds
dAvid
David I did not like the VQMod concept at first, but when I finally installed it with the VQMod Manager module I realized how much easier it is to change the function of the website without the hard code changes and now look forward to all my future upgrades being through VQMod.
Re: 1.5 Subcategory Images
Posted: Sun Sep 11, 2011 2:37 am
by keether
Ok, I installed vqmod then I uploaded "subcat_images2.xml" (link above) to: mycart/vqmod/xml
Is there anything else to do because it does not work for me with version 1.5.1.2
Any help please , I have spent hours trying to get sub images to show
Re: 1.5 Subcategory Images
Posted: Sun Sep 11, 2011 6:05 am
by Degsey
Firstly install VQMod Manager if you have not already and make sure that it says that the mod is installed and there are no error messages.
Also if you are not using the default template you have to alter the code in the xml file to show the new template name, I suspect that is what is happening to a lot of people, here is the line to alter.
Code: Select all
<file name="catalog/view/theme/default/template/product/category.tpl">
to
<file name="catalog/view/theme/
yourtemplatename/template/product/category.tpl">
Re: 1.5 Subcategory Images
Posted: Sun Sep 11, 2011 6:42 am
by keether
Thx I will try it
Re: 1.5 Subcategory Images
Posted: Sun Sep 11, 2011 8:20 am
by desymc
I've also spent hours today trying to sort the same problem with version 1.5.1.2 and tried all of the above and still no images. Any other ideas please??
Re: 1.5 Subcategory Images
Posted: Sun Sep 11, 2011 10:08 am
by okmarket
Hi Degsey,
I am sorry, I am not familiar with vqmod, so would you like to pls give me modification instruction by opencart 1.5.1? thank you again.
Re: 1.5 Subcategory Images
Posted: Sun Sep 11, 2011 10:19 am
by AliceH
okmarket, I think you should download and intall vqmod, you will save yourself an awful lot of time.
I really struggled with this so here is the step by step for anyone who is having problems
download and install vqmod. for the correct version of opencart read the instructions you will need to make sure the vqmod and vqmod cache files are writable then navigate to the link in the instructions to to install. easy peasy takes a few minutes.
Now take degsey's mod and open it in which editor you use, I like notepad++ now change the part that has the default template in the link to the name of your template.
so for mine I did this
Code: Select all
<file name="catalog/view/theme/kinder15/product/category.tpl">
now upload this to the xml folder in vqmod.
That is it, it is very easy and quick once you figure it out.