Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can someone help me with this?


Krallu

Recommended Posts

Posted

Hi!

 

I simple would like all text in categories in one specific color. And the subcategories in another color without affecting the other boxes.

 

Can someone please help me with that, where to add the color info to oscommerce?

 

Thanks a lot!

Posted

I presume that you are talking about the text in the Categories box. If so, try the following change. In catalog/includes/boxes/categories.php, find this code at line 34-35:

// display category name
   $categories_string .= $tree[$counter]['name'];

and change it to:

// display category name
   if ($tree[$counter]['level'] == 0) {
    $categories_string .= <span class=categoryLevel>;
    $categories_string .= $tree[$counter]['name'];
    $categories_string .= </span>;
   } else {
    $categories_string .= <span class=subcategoryLevel>;
    $categories_string .= $tree[$counter]['name'];
    $categories_string .= </span>;
   }

 

Then define styles for categoryLevel and subcategoryLevel in your stylesheet.

 

I haven't tested any of this, so no guarantees on the typos. If you have any problems please post them here.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted
I presume that you are talking about the text in the Categories box. If so, try the following change. In catalog/includes/boxes/categories.php, find this code at line 34-35:

// display category name
? ?$categories_string .= $tree[$counter]['name'];

and change it to:

// display category name
? ?if ($tree[$counter]['level'] == 0) {
? ? $categories_string .= <span class=categoryLevel>;
? ? $categories_string .= $tree[$counter]['name'];
? ? $categories_string .= </span>;
? ?} else {
? ? $categories_string .= <span class=subcategoryLevel>;
? ? $categories_string .= $tree[$counter]['name'];
? ? $categories_string .= </span>;
? ?}

 

Then define styles for categoryLevel and subcategoryLevel in your stylesheet.

 

I haven't tested any of this, so no guarantees on the typos.  If you have any problems please post them here.

 

Regards

Jim

 

Ok Great!

 

Many thanks!

Will try this during the day and report back if something is wrong that I can't fix myself.

Archived

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

×
×
  • Create New...