Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sub Categories


primedelux

Recommended Posts

Hi,

 

I would like to list sub categories from the main category ie:

 

All > Mens

 

Im using the following script but dont know how to modify i, any ideas?

 

  <li class="dir">Categories
           <?php

$categories_query = tep_db_query("SELECT `ca`.*, `cd`.* FROM `categories` `ca` LEFT JOIN `categories_description` `cd` ON `ca`.`categories_id` = `cd`.`categories_id` ORDER BY `ca`.`sort_order`");
$categories_list = "";
while ($categories = tep_db_fetch_array($categories_query)) {
$categories_list .= '<li><a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $categories['categories_id']) . '">' . $categories['categories_name'] . '</a></li>';
}
echo "<ul>$categories_list</ul>";?>
</li>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...