Jump to content
xt:Commerce Community Forum

tabellen in xtc_show_categorie


tom4545

Recommended Posts

hallo gemeinde,

ich w?rde gerne in der xtc_show_cat.... eine tabelle f?r kategorien und produkte

einbauen, damit die umbr?che nicht nach links rutschen.

z.b. so

tabelle.jpg

kann mir jemand sagen wo ich die <table><tr><td> usw. einsetzen muss?

ich habe schon stundenlang probiert mit den wildesten ergebnissen :wacko:

w?re unheimlich dankbar

Link to comment
Share on other sites

ok nach stundenlangem probieren hab ichs hinbekommen.

wers gebrauchen kann hier der code

   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...