Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add graphic to a box page


Danas Sutra

Recommended Posts

Hello All,

 

On a box page is it possible to add a graphic image- photos- instead of text?  If so, does anyboy have any suggestions how to do so or how to begin?

 

Thanks.

 

Hi! The easiest way to put images into a box is to use the Add Box Pages feature from the Knowledge Base and altering the code to include your image file.

 

http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/49

 

This includes all the files you will need to change and what. Then to add an image you woud use a code similar to this:

 

?>

<!-- My Box Info Box //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => BOX_HEADING_MY_BOX

);

new infoBoxHeading($info_box_contents, false, true);

 

$info_box_contents = array();

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

'text' => '<a href="http://www.outside_site.com" target="_blank">' . tep_image(DIR_WS_IMAGES . 'MY_PICTURE.gif' ,

BOX_INFORMATION_MY_BOX) . '</a><br>'

);

new infoBox($info_box_contents);

?>

</td></tr>

<tr>

<!-- my_box_eof //-->

 

This will put a linkable image in your new box to an outside site. If you want to link inside your site you would change the <a href"MY_PAGE.php" target="_blank">'......

 

I'm sure if you play with it a while you'll get what you want from it. Hope this is helpfull to you and anyone else that needs it. :rolleyes:

We help each other, to help ourselves!

Aloha Allison!

 

Liken to wrinkles, the many paths of my life not only altered my destiny, but my appearance.

 

Poetry, the artistry of plying ones soul to the empty canvases of life. A vision without sight. A verse without darkness. Lighting each day with a prose of beauty and love.

Link to comment
Share on other sites

Hi! The easiest way to put images into a box is to use the Add Box Pages feature from the Knowledge Base and altering the code to include your image file.

 

http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/49

 

This includes all the files you will need to change and what. Then to add an image you woud use a code similar to this:

 

?>

<!-- My Box Info Box //-->

          <tr>

            <td>

<?php

  $info_box_contents = array();

  $info_box_contents[] = array('align' => 'left',

                              'text'  => BOX_HEADING_MY_BOX

                              );

  new infoBoxHeading($info_box_contents, false, true);

 

  $info_box_contents = array();

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

                              'text'  => '<a href="http://www.outside_site.com" target="_blank">' . tep_image(DIR_WS_IMAGES . 'MY_PICTURE.gif' ,

BOX_INFORMATION_MY_BOX) . '</a><br>'

                              );

          new infoBox($info_box_contents);

?>

</td></tr>

<tr>

<!-- my_box_eof //-->

 

This will put a linkable image in your new box to an outside site. If you want to link inside your site you would change the <a href"MY_PAGE.php" target="_blank">'......

 

I'm sure if you play with it a while you'll get what you want from it. Hope this is helpfull to you and anyone else that needs it.  :rolleyes:

Link to comment
Share on other sites

Alison,

 

Thanks, your suggestion worked.

 

I have 2 other follow-up questions:

 

1. When I add the image to the box page it appears above the formatted page, can I put it where the text current is? To see what I mean if you go to my site: danas-sutra.org and check in the information box the page 'photos'.

 

2. Can I put 2 or 3 photos on the same page?

 

Thanks,

Meredoc.

Link to comment
Share on other sites

Alison,

 

Thanks, your suggestion worked.

 

I have 2 other follow-up questions:

 

1.  When I add the image to the box page it appears above the formatted page, can I put it where the text current is?  To see what I mean if you go to my site: danas-sutra.org and check in the information box the page 'photos'.

 

2. Can I put 2 or 3 photos on the same page?

 

Thanks,

Meredoc.

 

Hi! It appears to me that you're calling your images box above the body text main as it is at the top of your source code.

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt="" width="11" height="14"></td>

<td width="100%" height="14" class="infoBoxHeading">Information</td>

<td height="14" class="infoBoxHeading" nowrap><img src="images/infobox/corner_right.gif" border="0" alt="" width="11" height="14"></td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td align="center" class="boxText"><a href="photos.php" target="_blank"><img src="images/danas sutra 6.gif" border="0" alt="Photos" title=" Photos " width="703" height="464"></a><br></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

 

Try moving it to the area that is related to the page heading PHOTO. I beleive it should be somewhere in this range

 

<!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading">Photos</td>

<td class="pageHeading" align="right"><img src="images/table_background_specials.gif" border="0" alt="Photos" title=" Photos " width="30" height="30"></td>

</tr>

</table></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

YOUR IMAGE BOX HERE?

 

As I see it, this should put your images between the heading title PHOTOS and the foot title PHOTOS. before the continue button. And yes! you can have more than one image per box. Just add the same base code, with the added space called for like this:

 

 

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td align="center" class="boxText"><a href="photos.php" target="_blank"><img src="images/danas sutra 6.gif" border="0" alt="Photos" title=" Photos " width="703" height="464"></a><br></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td align="center" class="boxText"><a href="photos.php" target="_blank"><img src="images/danas sutra 7.gif" border="0" alt="Photos" title=" Photos " width="703" height="464"></a><br></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

 

I hope this helps you in some way. I really am not a coder, or programer. My method of understanding is hands on experimentation with a lot of help from our osC family/community. You may want to take a look at our store sometime.

 

http://www.giftsyouwanttokeep.com/ecommerce/os/catalog/

 

Have a great day! :rolleyes:

We help each other, to help ourselves!

Aloha Allison!

 

Liken to wrinkles, the many paths of my life not only altered my destiny, but my appearance.

 

Poetry, the artistry of plying ones soul to the empty canvases of life. A vision without sight. A verse without darkness. Lighting each day with a prose of beauty and love.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...