Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding an image before each category


msaunders

Recommended Posts

Posted

Hi

 

I want to add an image (a bullet) before each category name . Where do I need to edit the code to do this ? Is it in the category.php file ? Has anyone done this yet ?

 

Thanks

martin

Posted

probably in the category.php

 

that's where those -> are, so i'd assume that's where you'd go. give it a go.

 

those bullets are sometimes refered to as

<li>

Posted

    if (tep_has_category_subcategories($counter)) {

     $categories_string .= '->';

}

 

 

->

 

->

 

that's what it is. just take that out and make it look like this

 

    if (tep_has_category_subcategories($counter)) {

     $categories_string .= '';

   }

 

that's what i did. go here, http://www.animeglore.com/test2/

 

you'll see they are off. also, you'll see that if you click on a catagory, the selected catagory turns black and gets big.

 

fiddle around a bit

Posted

Aarrrgh!

I have done something to mess it up. Now, when I view my sub-categories, they jump to the bottom of the page... I cant figure out what I have done

Posted

lol. well did you back up the file?

 

 

just re-upload it, or restore it back to the old one, and try again.

 

MAKE SURE TO BACK UP.

Posted

Hi guys

Try this:

 

includes/categories.php -> Line 20

    $categories_string .= '<img src="' . DIR_WS_IMAGES . 'image.gif"><a href="';

 

Change image.gif to your image name.

Image must be on images folder.

.:: Jonas ::.

Posted

Hi there

 

That only adds them to the SUB CATEGORIES, not the main categories.

I only want the image on the MAIN , not the SUB

 

Thanks

martin

Archived

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

×
×
  • Create New...