Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help for adding images to boxes


ugurdal

Recommended Posts

First, I think there is a contribution that does this. I don't recall the name but if you search the contributions for infoboxes, you should be able to find it. If that fails, you can do it via the stylesheet.css file. Add

background-image: url('images/some_image.jpg');

to the infobox class.

 

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

First, I think there is a contribution that does this. I don't recall the name but if you search the contributions for infoboxes, you should be able to find it.  If that fails, you can do it via the stylesheet.css file. Add
background-image: url('images/some_image.jpg');

to the infobox class.

 

Jack

 

if you just want to show a pic, not a link, you can create a new box and only have the pic in it. Add the new file to the correct column and done!

:-)

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

I like to create new boxes on the left and righ side and jut put inside couple of pictures like visa fed -ex . Is it possible to do it and if it is please let me know how to do it .

 

Regards

 

I did this and it's not too hard.

 

First you'll need to read/print the documentation for

1) adding a new infobox;

Adding/removing infoboxes

 

and

2) add a new box style (only if you want this box to have a different style, like I did)

Add a new box style

 

What I did was follow the instructions for adding a new box but didn't add the pages/links into the box and instead used below for the "newbox.php" file: (you'll understand better if you read the documentation above). I named my box image.php

 

 

 

<?php
/*
 $Id: image.php,v 1.1.2.1 2003/04/18 17:42:37 wilt Exp $
 orig : information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- image //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_IMAGE);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
$info_box_contents[] = array('align' => 'left', 
'text' => '<center><a href="https://www.paypal.com/verified/pal=YOURPAYPALEMAIL" target="_blank"><img src="http://www.paypal.com/en_US/i/icon/verification_seal.gif" border="0" alt="Official PayPal Seal"></A><br>
<img src="http://www.MYDOMAIN/shop/images/cards.gif" />
</center>' 
);



 new imageBox($info_box_contents);
?>
           </td>
         </tr>
<!-- IMAGES_eof //-->

 

I also ended up needing to hide this infobox from my secure pages since it caused the secure/nonsecure pop up due to the off site image linking. I found that here;

Hide infobox from secure/nonsecure

 

HTH

Lauren

Link to comment
Share on other sites

I did this and it's not too hard. 

 

First you'll need to read/print the documentation for

1) adding a new infobox;

Adding/removing infoboxes

 

and

2) add a new box style (only if you want this box to have a different style, like I did)

Add a new box style

 

What I did was follow the instructions for adding a new box but didn't add the pages/links into the box and instead used below for the "newbox.php" file:  (you'll understand better if you read the documentation above).  I named my box image.php

<?php
/*
?$Id: image.php,v 1.1.2.1 2003/04/18 17:42:37 wilt Exp $
?orig : information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

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

?Copyright (c) 2003 osCommerce

?Released under the GNU General Public License
*/
?>
<!-- image //-->
? ? ? ? ?<tr>
? ? ? ? ? ?<td>
<?php
?$info_box_contents = array();
?$info_box_contents[] = array('text' => BOX_HEADING_IMAGE);

?new infoBoxHeading($info_box_contents, false, false);

?$info_box_contents = array();
$info_box_contents[] = array('align' => 'left', 
'text' => '<center><a href="https://www.paypal.com/verified/pal=YOURPAYPALEMAIL" target="_blank"><img src="http://www.paypal.com/en_US/i/icon/verification_seal.gif" border="0" alt="Official PayPal Seal"></A><br>
<img src="http://www.MYDOMAIN/shop/images/cards.gif" />
</center>' 
);
?new imageBox($info_box_contents);
?>
? ? ? ? ? ?</td>
? ? ? ? ?</tr>
<!-- IMAGES_eof //-->

 

I also ended up needing to hide this infobox from my secure pages since it caused the secure/nonsecure pop up due to the off site image linking. I found that here;

Hide infobox from secure/nonsecure

 

HTH

Lauren

 

 

 

Thank you

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...