Post by DannyMacD » Sat Oct 23, 2010 5:55 am

virgil wrote:Does someone please know how you can make it like this for v1.4.9.1:

Category_A (14)
Subcategory_A (3)
Subcategory_B (5)
Subcategory_C (6)

good to know if this works.

Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am

Post by NoJoke » Tue Jan 24, 2012 3:12 am

[quote="pepiw"]Hi,
this is the code modified for v1.4.4. Tested and work.

Code: Select all

$this->load->model('catalog/product');
                          $getTotal = '('. $this->model_catalog_product->getTotalProductsByCategoryId($result['category_id']) .')';
                 if ($this->category_id == $result['category_id']) {
                          $output .= '<a href="' . $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $new_path)  . '"><b>' . $result['name'] . '</b></a>'. $getTotal;
                 } else {
                         $output .= '<a href="' . $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $new_path)  . '">' . $result['name'] . '</a>' . $getTotal;
                 }
That code works for version 1.4.9.6.

Here is what I did to get the colors

For it to appear like :

Category (0)

I put this code in my style sheet

Code: Select all

#category ul {
    color: red;} 
or if you can find category ul in your style sheet you can add color to it.

For the subcategories :

Code: Select all

#category ul ul {color: purple;}

so the end result would be

Category (0)
Subcategory (8)

Hope it helps

Active Member

Posts

Joined
Fri Oct 14, 2011 5:37 am
Who is online

Users browsing this forum: Google [Bot] and 20 guests