Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Category indents


Guest

Recommended Posts

I want to get rid of the default    indent and change it to a custom one. However, when I go to the general.php in the directory /functions/ and change

 

  function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '') {
global $languages_id;

if (!is_array($categories_array)) $categories_array = array();

$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
  $categories_array[] = array('id' => $categories['categories_id'],
							  'text' => $indent . $categories['categories_name']);

  if ($categories['categories_id'] != $parent_id) {
	$categories_array = tep_get_categories($categories_array, $categories['categories_id'], $indent . '  ');
  }
}

return $categories_array;
 }

 

to equal

	  if ($categories['categories_id'] != $parent_id) {
	$categories_array = tep_get_categories($categories_array, $categories['categories_id'], $indent . 'dd');
  }

 

I still get the    prefix???

 

Any help is appreciated!!

Thanks a lot

alex

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...