Post by sivvaa » Thu Jun 09, 2011 11:57 pm

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
Last edited by i2Paq on Fri Jun 10, 2011 1:26 pm, edited 1 time in total.
Reason: Split, renamed and moved

New member

Posts

Joined
Mon Apr 18, 2011 7:46 pm
Location - India

Post by Daniel » Fri Jun 10, 2011 12:21 am

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.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by sivvaa » Fri Jun 10, 2011 12:28 am

Hi

I didnt email you. I have just PMed you.

You can check that link to understand what i mean.

Siva

New member

Posts

Joined
Mon Apr 18, 2011 7:46 pm
Location - India

Post by Daniel » Fri Jun 10, 2011 12:39 am

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.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by scmKORE » Fri Jun 10, 2011 2:55 am

How stupid are you people? This is a bug thread, not a "complain about something you don't like about the cart" thread. Stop wasting their time with your problems that aren't bugs.

New member

Posts

Joined
Mon May 02, 2011 9:57 am

Post by sivvaa » Fri Jun 10, 2011 4:45 pm

Sorry for the trouble.

You can delete this post altogether...

Really sorry for the wrong post...

New member

Posts

Joined
Mon Apr 18, 2011 7:46 pm
Location - India

Post by Melanie » Wed Jun 15, 2011 9:29 am

Anyone know how to do this?
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.

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by Melanie » Fri Jun 17, 2011 11:47 am

Does anybody know how to do this?
Please???????????


Thanks in advance

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by Melanie » Wed Jun 22, 2011 7:42 am

Any one have any ideas?

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by asphole » Thu Jun 23, 2011 6:50 am

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:

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 />
THEN:

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)
				);
			}
Replace With:

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

Active Member

Posts

Joined
Mon Mar 14, 2011 9:33 am

Post by asphole » Thu Jun 23, 2011 7:09 am

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

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>

Active Member

Posts

Joined
Mon Mar 14, 2011 9:33 am

Post by Melanie » Thu Jun 23, 2011 11:02 am

EXCELLENT, making some improvements, but great. Thanks a lot.
Mel

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by chirameto » Sat Jul 02, 2011 5:29 pm

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.

Newbie

Posts

Joined
Thu Jun 24, 2010 12:00 pm

Post by PaulD123 » Wed Jul 06, 2011 12:02 am

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

Newbie

Posts

Joined
Tue Jul 05, 2011 11:58 pm

Post by teratyke » Wed Jul 06, 2011 12:06 am

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

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by iamandy » Mon Jul 11, 2011 9:59 pm

Hey all,

I've done this mod. But it appears that it doesn't change the sub categories of sub categories..

Example:

Image

Image

New member

Posts

Joined
Wed Jun 22, 2011 11:19 pm

Post by teratyke » Mon Jul 11, 2011 10:06 pm

HI
Did you mean my mod in the other thread?
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
or the mod further up the page?

Rob

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by iamandy » Mon Jul 11, 2011 10:12 pm

The mod further up, Sorry!

New member

Posts

Joined
Wed Jun 22, 2011 11:19 pm

Post by teratyke » Mon Jul 11, 2011 11:31 pm

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

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by iamandy » Tue Jul 12, 2011 8:02 am

Okay! When I try your mod, with vqmod.. it just loads my page up as a blank white page. This must be a bug, right?

New member

Posts

Joined
Wed Jun 22, 2011 11:19 pm
Who is online

Users browsing this forum: No registered users and 35 guests