Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do you change the category text links to images?


consolefx

Recommended Posts

Surely this has been done before. Can someone please help? I'm new to Oscommerce, so things are a little foriegn to me. If I need to provide more info in order to get help, please let me know what and I will gladly post it.

 

Thanks!

Link to comment
Share on other sites

hi there,

I havent had a chance to look at the database structure but it would seem that the quick and easy way forward is to put an upload onto the admin page so the client can upload an image along with the data for the new catagory into a seperate images folder for links. The new image name should be based on the new category name.

 

now in the box you have the code to build the link and it pulls a field with the category ID in it ['categories_id'] so all you need to do is build $categories_string as an image link instead of a text link and viola, category image links.

 

I have no idea how new you are to it all but heres the bit to change:

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

 

theoretcially to this:

$categories_string .= "<img src=""http://yoursite.com/images/".$foo[$counter]['name'].".jpg"">";

 

At least this way we dont have to alter the tables in the db. and when you remove a category in the admin panel all you have to do is add a kill command to the script.

 

any objections?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...