Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

.gif files


Guest

Recommended Posts

How can I place an image in the Main_Text section on the Home page of my store? I have created a ".gif" image that I want to place near the bottom of the text for my Home page. Do I need to create a "Define" from the image folder and call it using "echo"? What's the protocall for this?

Link to comment
Share on other sites

The easy answer is that you just use standard html code: <img src=.... If you just want it displayed on your home page, then place it in the index.php file. If you want to show up on all of your pages, put it in the includes/header.php file. You can add it as a define somewhere if you want and then include that define. Or you can just use the straight code. If you are going to use it in more than one place, then go with the former.

 

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

The easy answer is that you just use standard html code: <img src=....  If you just want it displayed on your home page, then place it in the index.php file.  If you want to show up on all of your pages, put it in the includes/header.php file.  You can add it as a define somewhere if you want and then include that define.  Or you can just use the straight code.  If you are going to use it in more than one place, then go with the former.

 

Jack

 

Jack,

 

So, if I wanted the image centered and only on the home page, I would just enter <img src=DIR_WS_IMAGES . 'homepage_image.gif'> and place the gif in the image folder and put this all in the index.php file?

 

newbee, can you tell?

Link to comment
Share on other sites

Well, that's not really what I meant. I was meaning for that code to be included in the normal OSC code. Sorry for the confusion. Try this (just replace the three variables):

 	 <tr><td><?php echo tep_image(DIR_WS_IMAGES . 'homepage_image.gif', 'Home Page Title Text', image_width, image_height); ?>
 </td></tr>

 

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

Well, that's not really what I meant.  I was meaning for that code to be included in the normal OSC code.  Sorry for the confusion.  Try this (just replace the three variables):
 ?	<tr><td><?php echo tep_image(DIR_WS_IMAGES . 'homepage_image.gif', 'Home Page Title Text', image_width, image_height); ?>
?</td></tr>

 

Jack

 

Right, and I tried this and it gave me an error message of an unexpected T-script as I had entered this within a text statement rather then ending the Text, then restarting after the image insertion.

 

Instead, I used your first suggestion only this time I made sure the image name was exactly the same as the image I placed in the images folder :blush: , added a border as well as centering it and it worked. :thumbsup: As you stated last night, keeping it "relative" rather than "absolute" is much easier and complies with a web hosts format for your files.

 

In follow-up of our last email last night, I have taken the time to review the demo setup of oscommerce from our installation package. I see that there is a provision for adding a URL to the product writeup. Would this be where I would place the link to pdf file instead of a website, ie: images\specsheet_1.pdf? This would put the pdf files in with the images folder. Am I close or am I all wet?

 

Bill

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...