Jump to content
xt:Commerce Community Forum

Unterkategorien kaum vom Rest zu trennen


Ludinator

Recommended Posts

templates/deintemplate/source/inc/xtc_show_category.inc.php

allerdings habe ich mir die z?hne dabei ausgebissen.

du kannst die mal testen.

denk an die image-pfade oder bezeichnungen. je nach template k?nnen die unterschiedlich sein.

ich habe die unterkategorien in eine eigene tabelle gepackt, damit lange namen nicht nach links umgebrochen werden.

   function xtc_show_category($counter) {

  global $foo, $categories_string, $id;



  // image for first level


  $img_1='<img src="templates/'.CURRENT_TEMPLATE.'/img/icon_arrow.jpg"></td><td width="100%" >';


  for ($a=0; $a<$foo[$counter]['level']; $a++) {


   if ($foo[$counter]['level']=='1') {

   $categories_string .= '<tr><td valign="top"><font color="#CC0000"><b>•</b></font></td><td>';

   }


   $categories_string .= "";


  }

  if ($foo[$counter]['level']=='') {

  if (strlen($categories_string)=='0') {

  $categories_string .='<table border="0" width="100%" class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)"><tr><td valign="top">';

  } else {

  $categories_string .='</td></tr></table><table border="0" width="100%" class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)"><tr><td valign="top">';

  }


  // image for first level


  $categories_string .= $img_1;

  $categories_string .= '<b><a href="';

  //<img src="templates/zanier/img/recht_small.gif">

  } else {

  $categories_string .= '<a href="';

  }

  if ($foo[$counter]['parent'] == 0) {

   $cPath_new = 'cPath=' . $counter;

  } else {

   $cPath_new = 'cPath=' . $foo[$counter]['path'];

  }


  $categories_string .= xtc_href_link(FILENAME_DEFAULT, $cPath_new);

  $categories_string .= '">';


  if ( ($id) && (in_array($counter, $id)) ) {

   $categories_string .= '<b>';

  }


  // display category name

  $categories_string .= $foo[$counter]['name'];


  if ( ($id) && (in_array($counter, $id)) ) {

   $categories_string .= '</b>';

  }


  if (xtc_has_category_subcategories($counter)) {

   $categories_string .= '';

  }

  if ($foo[$counter]['level']=='') {

  $categories_string .= '</a></b>';

  } else {

  $categories_string .= '</a>';

  }


  if (SHOW_COUNTS == 'true') {

   $products_in_category = xtc_count_products_in_category($counter);

   if ($products_in_category > 0) {

    $categories_string .= '(' . $products_in_category . ')';

   }

  }


  $categories_string .= '<br>';


  if ($foo[$counter]['next_id']) {

   xtc_show_category($foo[$counter]['next_id']);

  }

 }


?>

Link to comment
Share on other sites

Archived

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

×
  • Create New...