Zen Follower
- Join Date:
- Aug 2005
- Posts:
- 130
- Plugin Contributions:
- 0
Need to show sub-category list when using columnar view
So I installed the mod that shows all products listed under a category and that works great. Actually I need a list of the sub-categories to STILL BE DISPLAYED.
See how a listing of a category looks at my store here: http://www.indigogreenstore.com/index.php?main_page=index&cPath=1
It shows the category description and then all products. What I'd like is little textual links to all the sub-categories shown before the description. I did this in another small store by hard coding it in the tpl_index_product_list.php like this:
<?php // THIS IS THE SUB-CATEGORY DROP-DOWN CODE I PUT IN, HAVE TO ENTER SUBCATS MANUALLY THO
if ($_GET['cPath'] == "9999") {
// TOPS CATEGORY
echo <<< EOF
<td width="440" align=right>
<FORM name="davesForm">
<select name="davesSelect">
<option value="">Showing all Tops...</option>
<option value="9_12">Casual</option>
<option value="9_13">Shirts/Blouses</option>
<option value="9_11">Strapless</option>
<option value="9_10">Tees</option>
</select>
</FORM>
</td>
EOF;
} else if ($_GET['cPath'] == "99999") {
// DRESSES CATEGORY
echo <<< EOF
<td width="440" align=right>
<FORM name="davesForm">
<select name="davesSelect">
<option value="">Showing all Dresses...</option>
<option value="1_5">Cocktail</option>
<option value="1_3">Day</option>
<option value="1_4">Evening</option>
</select>
</FORM>
</td>
EOF;
}
?>
Now that works, but as you can see I have to manually hard-code the sub-categories. Can someone provide the proper code to list the subcategories automatically given the category id? ALl it would be is an SQL query to the DB and pulling that info out, I'm just kind of lost how to do that in the Zen frame-work.
Thanks!

