Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Box Header Image problems


bhomis

Recommended Posts

Hi. I'm on english.php, trying to add box header images. I was able to add an image for Categories without any problems simply by adding the HTML code in place of the text like this:

define('BOX_HEADING_CATEGORIES', '<img src="images/catalog_tab_categories.gif">');

When I try different images for other box headers such as Shopping Cart or Quick Find, thier images don't appear, yet if I use the same image I used for categories - that works...

 

So now I'm trying the "Long Method" in the instructions to change box header images and I can't get any images to appear.

 

If anyone has suggestions, I would greatly appreciate it.

Thank you,

Bruce

Link to comment
Share on other sites

Hi. I'm on english.php, trying to add box header images. I was able to add an image for Categories without any problems simply by adding the HTML code in place of the text like this:

define('BOX_HEADING_CATEGORIES', '<img src="images/catalog_tab_categories.gif">');

When I try different images for other box headers such as Shopping Cart or Quick Find, thier images don't appear, yet if I use the same image I used for categories - that works...

 

So now I'm trying the "Long Method" in the instructions to change box header images and I can't get any images to appear.

 

If anyone has suggestions, I would greatly appreciate it.

Thank you,

Bruce

 

If I understand correctly, you want to replace the area on the boxes where it says "Shopping Cart", "Categories", etc. with images? I think this may work:

 

Open each respective box in includes/boxes. For example, let's change the Shopping Cart header by opening catalog/includes/boxes/shopping_cart.php. On about line 17 & 18, you get this:

 

 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART);

 

After those lines, add this:

echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'yourimage.gif', 'Shopping Cart') . '</a>';

 

where 'yourimage.gif' is whatever you decide to put in your images folder for the header image. Next, comment out the line

 

new infoBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART));

and you should be set.

 

j

Link to comment
Share on other sites

Ooops, I guess I forgot to mention that the other boxes don't have direct links like the shopping cart, so if there's no other file to link to, the line to add would go like this:

 echo tep_image(DIR_WS_IMAGES . 'yourimage.gif', 'Alt Image Text');

 

sorry :blush:

Link to comment
Share on other sites

Hi. Thanks for the help, but it didn't work. I got this message:

 

Parse error: parse error, expecting `','' or `';'' in /home/cust1/user1146517/html/catalog/includes/boxes/shopping_cart.php on line 24

 

If you have any more ideas, please let me know

Thanks again,

Bruce

 

I GOT IT!!!!!

Thanks so much.

I was somehow missing the semicolon after what you gave me...

Thanks again,

Bruce

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...