Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add picutures in the left side column


Gamermatt

Recommended Posts

Hi Matt,

you would have to 1 file.

a. includes\column_left.php [Add new file as required or include ... ]

  require(DIR_WS_BOXES . 'whats_new.php');
 require(DIR_WS_BOXES . 'search.php');
 require(DIR_WS_BOXES . 'information.php');
 require(DIR_WS_BOXES . 'my_pictures.php');  //------> As an example.
?>

 

b. Go to includes\boxes and create a file named my_pictures.php (or whatever you define in code above.

c. Each file in box, is created with a Table structure (so begins with <TR><TD>... etc </TR></TD>

d. Insert image in TD - your code is correct but for typo in img tag .. ending with jph instead of jpg.

e. Copy image in path that you define in my_pictures.php

That should do the trick,

 

PS: Another way would be do put the code in column_left.php .. but i would not recommend it ...

Tip - By moving position in column_left.php -- your picture would move up or down, depending upon the order in which code is placed!!!

 

Cheers,

Best Regards,
Gaurav

Link to comment
Share on other sites

hmm... ok....

 

so i edited column_left.php and put in this code:

 

  require(DIR_WS_BOXES . 'search.php');

 // STS: ADD
 $sts_block_name = 'searchbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 require(DIR_WS_BOXES . 'information.php');

 require(DIR_WS_BOXES . 'pictures.php');

 // STS: ADD
 $sts_block_name = 'informationbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 

is that the right place to add the require(DIR_WS_BOXES . 'pictures.php');?

 

and then i created a file named "pictures.php" and put it in boxes/pictures.php .... and i put this code in it:

 

<?php
/*
 $Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- search //-->
	  <tr>
		<td>
<img src=http://www.carbodykitstore.com/catalog/images/paypal.jpg>
?>
		</td>
	  </tr>
<!-- search_eof //-->

 

is that correct?

 

and is that all i need to do? something must be wrong because the picture doesnt come up >.>

 

thanks again man, your awesome :D

Link to comment
Share on other sites

What you have done is perfect.

If picture doesn't come up ... you need to check if you have edited right file. I checked sourcecode and nothing to indicate that this code has been invoked ...

rename pictures.php and if you get error on home page - we would at least know that this file is indeed being read...

We would take suitable action after this test :)

 

Cheers,

Best Regards,
Gaurav

Link to comment
Share on other sites

Or a workaround to put it below Contact Us...

Search for following code in \includes\boxes\information.php

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

Replace with

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . 
BOX_INFORMATION_CONTACT . '</a><BR><center><img src="http://www.carbodykitstore.com/catalog/images/paypal.jpg"></center>');

 

* Don't enjoy spoiling original code with hardcoded URL's .. :( forgive me binary god...

 

Sighs.... Try what I recommended in previous post.. but if shortcut is what you want.. this would do the trick(!)

Cheers,

Best Regards,
Gaurav

Link to comment
Share on other sites

still, never use hardcoded paths in your images. They will give you nasty secure/insecure alerts on all your SSL pages.

 

<img src="http://www.carbodykitstore.com/catalog/images/paypal.jpg">

 

should be (add the border, or it will have a blue outline)

 

<img src="images/paypal.jpg" border="0">

 

or even better, use the tep_image function that was created just to help with adding images correctly.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

k i tried renaming pictures.php to pictures1.php and it gave me an error, so i guess the code is getting read... are u sure i put it in the right place?

 

nvm i tried editing information.php like you said, and it worked!!! k thanks thats all i need :D thanks man

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...