Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/11/2005, 11:20
Avatar de yuguilley
yuguilley
 
Fecha de Ingreso: febrero-2004
Ubicación: Montenegro Quindío
Mensajes: 108
Antigüedad: 20 años, 2 meses
Puntos: 0
De acuerdo Shopping problema

Hola

Tengo un problema,

tengo un shopping, que cuando le doy click a una categoria me muestra otra subcategoria.
Ej: TOYS:
niños | ninas | adolecentes

y cuando selecciono por ejemplo niños, me lleva a esa subcategoria (hasta aqui todo bien), pero se me desaparece la subcategoria y queda asi:
Ej: TOYS:

Quiero que siempre permanescan las subcategorias visibles

este es el codigo:

Código PHP:
<?php
    
if (isset($cPath) && strpos('_'$cPath)) {
// check to see if there are deeper categories within the current category
      
$category_links array_reverse($cPath_array);
      for(
$i=0$n=sizeof($category_links); $i<$n$i++) {
        
$categories_query tep_db_query("select count(*) as total from " TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id "'");
        
$categories tep_db_fetch_array($categories_query);
        if (
$categories['total'] < 1) {
          
// do nothing, go through the loop
        
} else {
          
$categories_query tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id "' order by sort_order, cd.categories_name");
          break; 
// we've found the deepest category the customer is in
        
}
      }
    } else {
      
$categories_query tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd where c.parent_id = '" . (int)$current_category_id "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id "' order by sort_order, cd.categories_name");
    }

    
$number_of_categories tep_db_num_rows($categories_query);

    
$rows 0;
    while (
$categories tep_db_fetch_array($categories_query)) {
      
$rows++;
      
$cPath_new tep_get_path($categories['categories_id']);
      
$width = (int)(100 MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
      echo 
'                <a href="' tep_href_link(FILENAME_DEFAULT$cPath_new) . '">' $categories['categories_name'] . '</a> |' "";
      if (((
$rows MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
        echo 
'              ' "";
        echo 
'              ' "";
      }
    }

// needed for the new products module shown below
    
$new_products_category_id $current_category_id;
?>
Les agradeceria mucho su ayuda