can help me with this php coding?
can help me with this php coding?
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.
is there anyone going to help or not. I like to get this going......
is there anyone can help me on this????????
Can anyone able to help me on this?
Wade
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.
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.
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
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