Hi
We badly need the old way of display of SUB CATEGORIES.
The current one (1.5.x) displays SUBCATEGORIES in a very bad way.
I believe most of the users will agree.
Siva
We badly need the old way of display of SUB CATEGORIES.
The current one (1.5.x) displays SUBCATEGORIES in a very bad way.
I believe most of the users will agree.
Siva
Last edited by i2Paq on Fri Jun 10, 2011 1:26 pm, edited 1 time in total.
Reason: Split, renamed and moved
Reason: Split, renamed and moved
sivvaa wrote:Hi
We badly need the old way of display of SUB CATEGORIES.
The current one (1.5.x) displays SUBCATEGORIES in a very bad way.
I believe most of the users will agree.
Siva
WHICH part of the word bug thread do you not understand. this is not a feature request thread.
are you the the guy who just emailed me about this?
You can not have unlimited number of sub categories showing in the boxes because there is not enough width!.
OpenCart®
Project Owner & Developer.
sivvaa wrote:Hi
I didnt email you. I have just PMed you.
You can check that link to understand what i mean.
Siva
I got your pm but it is not a feature request forum.
also the categories are set like there set is because if one of the categories does not have an image or a missing image the missing image one looks stupid.
this is a 3 minute job to change if you know php.
OpenCart®
Project Owner & Developer.
Anyone know how to do this?
Any advice.
Thanks,
Mel
Any advice.
Thanks,
Mel
Daniel wrote:sivvaa wrote:Hi
I didnt email you. I have just PMed you.
You can check that link to understand what i mean.
Siva
I got your pm but it is not a feature request forum.
also the categories are set like there set is because if one of the categories does not have an image or a missing image the missing image one looks stupid.
this is a 3 minute job to change if you know php.
Hi Melanie,
Im not sure if this is what you're after but I have edited mine to show category images and not just text links.
To do this:
Edit Catalog>View>Theme>Your_Template>Template>Product>Category.tpl
Find:
Replace with:
THEN:
Edit Catalog>Controller>Product>Category.php
Find:
Replace With:
Then upload both files to the correct location on your server. Mine just has a <br> tag but you could format this however you like.
Best of luck.
Im not sure if this is what you're after but I have edited mine to show category images and not just text links.
To do this:
Edit Catalog>View>Theme>Your_Template>Template>Product>Category.tpl
Find:
Code: Select all
<li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li>
Replace with:
Code: Select all
<li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li>
<br /> <img src="<?php echo $categories[$i]['thumb']; ?>" /> <br />
Edit Catalog>Controller>Product>Category.php
Find:
Code: Select all
foreach ($results as $result) {
$product_total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $result['category_id']));
$this->data['categories'][] = array(
'name' => $result['name'] . ' (' . $product_total . ')',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);
}
Code: Select all
foreach ($results as $result) {
$product_total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $result['category_id']));
$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
$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
);
}
Best of luck.
Sorry, last example had image as static image and not clickable link. Add this instead for a clickable link:
Edit Catalog>View>Theme>Your_Template>Template>Product>Category.tpl
Find:
Code: Select all
Replace with:
Edit Catalog>View>Theme>Your_Template>Template>Product>Category.tpl
Find:
Code: Select all
Code: Select all
<li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li>
Replace with:
Code: Select all
<li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a>
<br /><a href="<?php echo $categories[$i]['href']; ?>" alt="<?php echo $categories[$i]['name']; ?>" title="<?php echo $categories[$i]['name']; ?>"><img src="<?php echo $categories[$i]['thumb']; ?>" /></a><br /></li>
Thanks asphole, Just what I need!
I have been trying to change the category.tpl file before, but it is not working. Now that you have mention the underlying function in category.php, I can get it to work.
Sadly I have to repeat this step once the new version came out.
I have been trying to change the category.tpl file before, but it is not working. Now that you have mention the underlying function in category.php, I can get it to work.
Sadly I have to repeat this step once the new version came out.
Hi,
Just wanted to say thankyou to asphole, was struggling with that one a bit. Your example has suddenly made everything clear.
Paul.
PS I cannot believe how fantastic Open Cart is - the market leader by a long way IMHO. This is my first use/try out and I cannot wait to really get to grips with it. If only my php was a bit stronger :-)
Just wanted to say thankyou to asphole, was struggling with that one a bit. Your example has suddenly made everything clear.
Paul.
PS I cannot believe how fantastic Open Cart is - the market leader by a long way IMHO. This is my first use/try out and I cannot wait to really get to grips with it. If only my php was a bit stronger :-)
Just found this thread, there seems to be two running in parallel.
I have uploaded a VQMOD file for this - should work on a default installation.
See here..
viewtopic.php?f=20&t=34923#p171254
Hope it helps.
Rob
I have uploaded a VQMOD file for this - should work on a default installation.
See here..
viewtopic.php?f=20&t=34923#p171254
Hope it helps.
Rob
HI
Did you mean my mod in the other thread?
Rob
Did you mean my mod in the other thread?
or the mod further up the page?teratyke wrote:Just found this thread, there seems to be two running in parallel.
I have uploaded a VQMOD file for this - should work on a default installation.
See here..
http://forum.opencart.com/viewtopic.php ... 23#p171254
Hope it helps.
Rob
Rob
AH ok - don't know about that, sorry.
The vqmod file i posted in the other thread isn't the same code changes as above - so may have a different effect on your site. If you have vqmod installed (I would highly recommend it) then it would be a 2 minute job to see if it works for you. I'm on 1.5.0.5 and it displays sub-sub-cat images.
Rob
The vqmod file i posted in the other thread isn't the same code changes as above - so may have a different effect on your site. If you have vqmod installed (I would highly recommend it) then it would be a 2 minute job to see if it works for you. I'm on 1.5.0.5 and it displays sub-sub-cat images.
Rob
Who is online
Users browsing this forum: No registered users and 57 guests