Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Index images


MimiQue

Recommended Posts

Posted

I'm trying to do something so simple and it keeps messing up on me. Can someone tell me where I should put the code so that I can put an image on my index/main page for all languages. I don't want it in the template just on the hompage. I want to put it below the banner and above the new products listings. Every time I try to insert it just messes up. I know its a lame question but I've been stuck on this for over an hour. Any help would be appreciated.

 

Thank you!! MQ

Posted

Find the following code in the catalog/index.php file. I would add another table row as indicated in red. This will place the image below any specified content from the index.php files in the languages directories and above the new products display. This code is around line 292.

 

<?php

} else { // default page

?>

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

<tr>

<td><table border="0" width="500" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

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

</tr>

<tr>

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

<!--<tr>

<td class="main"><?php // echo tep_customer_greeting(); ?></td>

</tr>-->

<tr>

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

</tr>

<tr>

<td class="main"><?php echo TEXT_MAIN; ?></td>

</tr>

<tr>

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

</tr>

<tr>

<td><img src="images/yourimage.gif" width="" height="">

<tr>

<tr>

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

</tr>

Posted

Meridith,

 

Question: If you are looking to put images in the Index / Main page, are you trying to put them in the [ define('TEXT_MAIN') ] section of the catalog/includes/languages/english, espanol, german/index.php ?

 

If so, this should work without any problem.

 

 

Pete

Posted

Pete's right, but if you want to save steps and want your image in the exact place regardless of what language file osC is pulling from, adding it to the html in catalog/index.php will save you a few steps and guarentee its correct possition.

Posted
Pete's right, but if you want to save steps and want your image in the exact place regardless of what language file osC is pulling from, adding it to the html in catalog/index.php will save you a few steps and guarentee its correct possition.

 

Thank you for the help I've almost got it, but for some reason it is running a line through the image. The image is fine, also I double checked it. It looks like something might be wrong with the code. Will you take a look and see if there is something wrong here.

 

<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"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

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

</tr>

<tr>

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

<!--<tr>

<td class="main"><?php // echo tep_customer_greeting(); ?></td>

</tr>-->

 

<tr>

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

</tr>

<tr>

<td><div align="center"><img src="/catalog/images/index_picture.jpg" width="1000" height="600" align="center">

</div>

</tr> <tr>

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

</tr>

<tr>

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

</tr>

<tr>

<td class="main"><?php echo $pagetext; ?></td>

</tr>

<?php

include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);

?>

</table></td>

</tr>

</table></td>

<?php

 

 

The red is what I changed. I also know it's not because I centered it either because I tried it without the center and it didn't matter the line is still there. If I load the image on another page its fine.... hum... can't figure it out. Just something else to make me crazy! Thanks

Posted

Your code looks fine. Could you post a link to the page so I could see what's happening? Then I could look at the code output as well.

Posted

Tim,

 

Thanks for the kind words!

 

 

 

Meredith,

 

src="/catalog/images/index_picture.jpg" width="1000" height="600"

 

That's one hum-dinger of an image size! Can you post a link to the site so we can get a better idea of what you're seeing?

 

 

Pete

Posted

I just saved the image to my pc and opened it in viewer. The line is in the image. Your code is not producing the line.

 

Check your original. Delete the old image from your osC install, then upload the image again.

Posted
I just saved the image to my pc and opened it in viewer. The line is in the image. Your code is not producing the line.

 

Check your original. Delete the old image from your osC install, then upload the image again.

 

Thanks for your help, I fixed it. I kept putting the updated image in the wrong image folder... but I got to the root of it.

 

I have one more easy question, if you have time. How do I move the "What's new here?" and new items icon below that pic.

 

Thank you thank you thank you.

Meredith

Posted

Just above the img tag you just inserted, find the following table row (about line 298)

 

<tr>
	<td><table border="0" width="500" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>

 

... and move it where you want it, like below (in red). I would also add another call for the transparent separator to be sure of proper spacing between the "What's New Here" line and the New Products section (in green).

 

<tr>

<td><div align="center"><img src="/catalog/images/index_picture.jpg" width="1000" height="600" align="center">

</div>

</tr>

<tr>

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

</tr>

<tr>

<td><table border="0" width="500" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

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

</tr>

<tr>

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

</tr>

Posted
Just above the img tag you just inserted, find the following table row (about line 298)

 

<tr>
	<td><table border="0" width="500" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>

 

... and move it where you want it, like below (in red). I would also add another call for the transparent separator to be sure of proper spacing between the "What's New Here" line and the New Products section (in green).

 

Thanks a bunch!

MQ

Archived

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

×
×
  • Create New...