Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Creating a new box ( which I can put what ever In I want )


Guest

Recommended Posts

Hello ..

 

I would like to create a new box , not muck around with a nother box. If you could post just the code to create a new box and the include statement to lets say pull information fromt a txt file that contains an table of some sort ... etc

 

Thanks .. :)

Link to comment
Share on other sites

The infoBoxes don't work that way. You have to use the existing format because of the infoBox class that puts them together.

 

If you just want a box that matches them, put together an HTML box by looking at your source using your browser to se the html output.

Link to comment
Share on other sites

Create a new box code (at least what i use...):

 

<?php

/*

 $Id: newsletter.php,v 1.0 2003/04/27 22:31:00 networkdad Exp $



 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com



 Copyright (c) 2003 osCommerce



 Released under the GNU General Public License

*/

?>

<!-- information //-->

         <tr>

           <td>

<?php

 $info_box_contents = array();

 $info_box_contents[] = array('text' => BOX_HEADING_NEWSLETTER);



 new infoBoxHeading($info_box_contents, false, false);



 $info_box_contents = array();

 $info_box_contents[] = array('text' => 'put your html or text here');



 new infoBox($info_box_contents);

?>

           </td>

         </tr>

<!-- information_eof //-->

 

You'll have to:

*change BOX_HEADING_NEWSLETTER to whatever you want. Just make sure to define it in your language file (/catalog/includes/languages/english.php)

*Put your html or text code in where it says put your html or text here/b]

*Save the file as whatever you like in /catalog/includes/boxes/filename.php

*Depending on where you want your box, just call it with:

require(DIR_WS_BOXES . 'filename.php');

 

Good luck.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...