Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add Image to Catalog Index Page


Stargrrl

Recommended Posts

Posted

I want to add a large image to the catalog index page where it currently says,

 

"Whats new here?"

 

The image is just for presentational purposes for the product and wont contain any image mapped links.

 

Is this possible or will I need to find a contribution?

 

Thanks much,

A

Posted

In catalog/index.php find around line 290 or so

		  <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>

The HEADING_TITLE is what brings in the Whats New. The second part is the little pic to the right.

You could just add another <tr>and <td> so it looks like so

		  <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>
	  <tr>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'your_image_here.gif', YOUR_IMAGE_TITLE_HERE); ?></td>
	  </tr>

Put the image in your images directory. Change your_image_here.gif with the name of your image. Change YOUR_IMAGE_TITLE_HERE to whatever you want and create a define for it in catalog/includes/languages/your language file like so

define('YOUR_IAMAGE_TITLE_HERE', 'Your Image Name');

That define will add the alt text to the image

Posted

Thanks that worked the first time I tried it, always nice :0)

 

You lost me on the last part. Which file should I be adding the define to in Languages. Theres a bunch of php files in that folder (Catalog ->Includes -> Languages -> English) Also does it matter where in the php document I put that new define?

 

Thanks again to Brian,

A

 

 

In catalog/index.php find around line 290 or so

 

Put the image in your images directory. Change your_image_here.gif with the name of your image. Change YOUR_IMAGE_TITLE_HERE to whatever you want and create a define for it in catalog/includes/languages/your language file like so

define('YOUR_IAMAGE_TITLE_HERE', 'Your Image Name');

That define will add the alt text to the image

Posted

If your default language is english, then put it in

catalog/includes/languages/english.php

You can put that right before the closing ?> at the the bottom of the page. It doesn't matter where just as long as it is between the <?php and ?> tags.

Hope that helps

Archived

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

×
×
  • Create New...