Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Want to add button image in categories


xPATRIOTSx

Recommended Posts

categories.gif

I want to add the above button image under each categories text in my categories info box. Also would want to get rid of the border and heading entirely.

 

How do I do that? :P I searched the forums and contribs but didn't find anything :(

Go New England Patriots!!!!

Link to comment
Share on other sites

I do not know if it is will work, just an idea

 

in categories box has line

$categories_string .= '<br>';

 

this making space betwin names

 

try to change this line to something like this

 

$categories_string .= tep_image(DIR_WS_IMAGES . 'imagename.gif', '');

 

:-"

Link to comment
Share on other sites

I do not know if it is will  work,  just an idea

 

in  categories box  has line

$categories_string .= '<br>';

 

this making space betwin  names

 

try to change this line to something like this

 

$categories_string .= tep_image(DIR_WS_IMAGES . 'imagename.gif', '');

 

:-"

Thanks for trying but it didn't work. It placed the image next to each category, and the whole category box became horizontal instead of vertical hehe

Go New England Patriots!!!!

Link to comment
Share on other sites

  • 2 weeks later...

I am using the All Categories contribution (#62 I think it may be) and I just modified the categories.php file in which I added this line in three places. It puts the bullet image at the beginning of the category, sub-cat, and sub-sub-cat... It looks nice with all the cats and subcats listed out. Anyway, it's not directly going to solve your problem but may help someone else using the same contribution or may help you figure out where to put the <BR> space in the file. I'm trying to do that myself - so there's demarcation between categories (I have tons of sub-cats and sub-sub-cats). If you figure out how to add a spacer line, please post it !!

 

<img src="images/categories_bullet.gif" border="0" alt=""> 

 

Notice 3 spots in categories.php where line is (but am using the all categories file, not original MS2 file).

 

// Preorder tree traversal

function preorder($cid, $level, $foo, $cpath) {

global $categories_string, $HTTP_GET_VARS;

 

if ($cid != 0) {

// 1.7 Get the current path info

$category_path = explode('_','<img src="images/categories_bullet.gif" border="0" alt=""> ',$HTTP_GET_VARS['cPath']);

$in_path = in_array($cid, $category_path);

$this_category = array_pop($category_path);

 

for ($i=0; $i<$level; $i++)

// 1.7 only indent subcategories (top level are flush left)

if ($i>0) {

$categories_string .= '     ';

}

// 1.7 indicate the current category

if ($this_category == $cid) {

$categories_string .= '<img src="images/categories_bullet.gif" border="0" alt=""> ';

}

 

// 1.7 don't link the current category

if ($this_category != $cid) {

$categories_string .= '<img src="images/categories_bullet.gif" border="0" alt=""> <a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cpath . $cid) . '">';

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...