Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Categories navigation customization


quomo

Recommended Posts

Posted

I am interested in modifying how the Categories Box Navigation is displayed.

This is because I may end up with warped lines due to the number of subcategories, and a confusing navigation (where the visitor may not know which links belong to what level). What I would like to do is to assign a different look to categories and subcategories. For example, have categories go purple (like now you can see at http://facialworksdublin.com/shop/index.php) and subcategories go purple also when visited but with a bullet or a dash before the name, something like:

 

?CATEGORY

-subcategorie

>product

>product

>product

 

I modified the code as shown bellow, and now I get this:

 

?CATEGORY

?subcategorie

?product

?product

?product

 

THIS IS THE CODE, lines 20 to 45 in includes/boxes/categories.php

 

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

 

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

$cPath_new = 'cPath=' . $counter;

} else {

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

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<font color= #CC339F>•<b>';

}

 

// display category name

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

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

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

}

 

if (tep_has_category_subcategories($counter)) {

$categories_string .= '';

}

 

$categories_string .= '</a>';

 

There is only one string to write the navegation, how could I do what I want?

If there is a similar question posted, I will be happy to be pointed out.

 

Thanks

Archived

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

×
×
  • Create New...