Forums / General Questions / move Sub Categories Count

move Sub Categories Count

Locked
Results 1 to 20 of 23
This thread is locked. New replies are disabled.
10 Jan 2008, 05:06
#1
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

move Sub Categories Count

ok I will try to do my best to explain this....

I don't want to show Sub Categories Counts in the Categories Box. But in the sub categories listing like for an example:

http://www.mtechama.com/sample1.jpg

But first I want to get rid of the Sub Categories Whats New Module.

and I want to put the sub-categories count where I have circled.

is that possible?
10 Jan 2008, 14:42
#2
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

Can anyone help me????
11 Jan 2008, 02:58
#3
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

Anyone!!!!!
11 Jan 2008, 04:43
#4
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

Ok I got rid of the module....... now I need help on the Sub Category Counts.
11 Jan 2008, 15:15
#5
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

If anybody doesn't want to help me I will go back to osCommerce........
11 Jan 2008, 16:30
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: move Sub Categories Count

The problem is that what you want, if I understand correctly, would require some new database queries as well as new PHP coding, and the number of people who can help with that is much smaller that the whole population here.

Are you wanting the subcategories in your example, for instance, to show like this?

Christmas (3) John Deere (1) Valentines Day (7)
11 Jan 2008, 16:32
#7
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

gjh42:

The problem is that what you want, if I understand correctly, would require some new database queries as well as new PHP coding, and the number of people who can help with that is much smaller that the whole population here.

Are you wanting the subcategories in your example, for instance, to show like this?

Christmas (3) John Deere (1) Valentines Day (7)


yes that is what I want exactly.

Can you able to help me?
11 Jan 2008, 16:39
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: move Sub Categories Count

Sorry, I haven't done any database work yet, so I'm not the one for the job.
11 Jan 2008, 16:41
#9
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

anyone else can help me?!?!?!!
28 Jan 2008, 18:21
#10
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

Can someone help me on this Categories Counts?
29 Jan 2008, 04:16
#11
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

can help me with this php coding?
29 Jan 2008, 19:36
#12
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

mtechama:

can help me with this php coding?


No One?!?!
03 Feb 2008, 17:38
#13
jiffy avatar

jiffy

New Zenner

Join Date:
Nov 2007
Posts:
20
Plugin Contributions:
0

Re: move Sub Categories Count

I'd be interested in this as well. Seems like it would only be a simple snipit of code to add but I'm clueless as to what it would be.
05 Feb 2008, 15:51
#14
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

is there anyone going to help or not. I like to get this going......
13 Feb 2008, 22:01
#15
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

is there anyone can help me on this????????
19 Feb 2008, 20:54
#16
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

Can anyone able to help me on this?


Wade
19 Feb 2008, 21:04
#17
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: move Sub Categories Count

I think it's obvious that none of the volunteers who know how are interested in spending time on that problem.
You might post in Commercial Help Wanted if it is really important to you.
19 Feb 2008, 21:11
#18
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: move Sub Categories Count

Look at the module named Simple Category Tree under my sig.
You may need to add a few lines of code to do exactly what you want.
19 Feb 2008, 21:32
#19
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

Re: move Sub Categories Count

yellow1912:

Look at the module named Simple Category Tree under my sig.
You may need to add a few lines of code to do exactly what you want.


do you a something in action so I can take a look at to see if that is what I want to do?
29 Mar 2008, 05:32
#20
digitechstop avatar

digitechstop

New Zenner

Join Date:
Oct 2006
Posts:
6
Plugin Contributions:
0

Re: move Sub Categories Count

this solution doesn't follow the zen cart conventions yet, but it should do.

go to includes/modules/category_row.php

find the two lines on the outside of the #############(about line 34)

paste the code below in place:

// strip out 0_ from top level cats
$cPath_new = str_replace('=0_', '=', $cPath_new);

// ##################################################################
$myCatID = substr($cPath_new, -3);
// $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']);

$check_categories = $db->Execute("select products_id from " . TABLE_PRODUCTS . " where
master_categories_id = '".$myCatID."'");
if ($check_categories->RecordCount() > 0) {
// create number here
$recordCount = $check_categories->RecordCount();
}

$countContent = CATEGORIES_COUNT_PREFIX . $recordCount . CATEGORIES_COUNT_SUFFIX;


$list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'].' '.$countContent.'</a>');
// ##################################################################
$col ++;

- beware of how I created $myCatID ->this will only work if your category IDs are 3 digits long. - I'll fix this up in future
- you can see this in action at http://www.digitechstop.com