Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding a image in an infobox


Joker Race Wear

Recommended Posts

I am trying to add a picture above the event name in the box below. The box with just text works great on my site. I am just trying to add a little more style to the box. I own a clothing company dealing with racing, so I want to inform people of the next event I will be at selling my product.

 

<!-- event_box //-->

<tr>

<td>

<?php

$info_box_contents = array();

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

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center','text' => '

 

//add image here

Event Name<BR>

Event Location<BR>

Town Location<BR>

Date<BR><BR><BR>

 

//add image here

Event Name<BR>

Event Location<BR>

Town Location<BR>

Date<BR><BR>'

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- event_box_eof //-->

 

Thanks in advanced for any help.

Link to comment
Share on other sites

Where you have this....

 

$info_box_contents = array();

$info_box_contents[] = array('text' => 'Next Event')

 

 

Change it to this, replacing IMAGENAME with the name of you image.

 

$info_box_contents = array();

$info_box_contents[] = array('text' => tep_image(DIR_WS_IMAGES .'IMAGENAME.jpg')

Link to comment
Share on other sites

How do I add the image in the second place?

 

 

Upload the image you want to use into your catalog/images folder first. Then make the code change. Where (in the example above) you see "IMAGENAME", change that to the name of whatever image you want to use.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...