Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Main page


Guest

Recommended Posts

Hello all,

 

I'm very new to php and so I'm not quite sure how to go about editing the main page so that I can have a nice image show there above my "New Products" infobox.

 

I've tried adding an image tag to this line: define('TEXT_MAIN', ''); with no luck.

 

Can anyone help me with this?

Link to comment
Share on other sites

you can add the image via the define TEXT_MAIN or by adding html code to the main index.php

 

add image in define:

define('TEXT_MAIN', 'This is any text you want' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . 'This is any text you want');

or in the main index.php

 

<tr>
<td><?php echo tep_image(DIR_WS_IMAGES . 'default/1.gif'); ?></td>
</tr>

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

There are a few ways you can do it. The easiest is probably this: Find this code in your catalog/index.php file

 <tr>
           <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
         </tr>

and right before it place this

<tr>
<td>
<img src="images/some_img.gif" width="X" height="Y" alt="Some text" title="Some text">
</td>
</tr>

I think that should do it. :)

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

There are a few ways you can do it. The easiest is probably this:  Find this code in your catalog/index.php file
 <tr>
           <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
         </tr>

and right before it place this

<tr>
<td>
<img src="images/some_img.gif" width="X" height="Y" alt="Some text" title="Some text">
</td>
</tr>

I think that should do it. :)

 

Jack

Ok, this isn't working for some reason. Nothing is showing up. Here's my code, do you see anything wrong?

 

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td>

<img src="/image/grouping4f.jpg" width="x" height="y" alt="Some text" title="Some text">

</td>

</tr>

<tr>

<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

</tr>

</table></td>

</tr>

</table></td>

Link to comment
Share on other sites

Yes, the width & height have to be set. I just put X & Y to indicate that. Also, though not required, as Steve mentioned, you should use the tep_image function. That way, should you change your image directory at some point, your images will still work.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...