Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Code for infobox include


skeedo

Recommended Posts

Posted

I don't know if I'm just not searching right or what but I can't find what should go into a custom created infobox. I tried copying the languages.php box file and editing that, but it's just a bunch of PHP that I don't know. I just want a box with my own HTML in it.

Posted

Well, the current one I want to put up is going to be a box for current US News. I have plans for others as well. Anyone of the code for just the frame of a box?

Posted

Probably the easiest one to modify is the information box.

 

<?php

/*

 $Id: information.php,v 1.2 2002/08/31 17:39:34 wilt Exp $



 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com



 Copyright (c) 2001 osCommerce



 Released under the GNU General Public License

*/

?>

<!-- information //-->

         <tr>

           <td>

<?php

 $info_box_contents = array();

 $info_box_contents[] = array('align' => 'left',

                              'text'  => BOX_HEADING_INFORMATION

                             );

 new infoBoxHeading($info_box_contents, false, false);



 $info_box_contents = array();

 $info_box_contents[] = array('align' => 'left',

                              'text'  => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_GV_REDEEM, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');//ICW ORDER TOTAL CREDIT CLASS/GV

 new infoBox($info_box_contents);

?>

           </td>

         </tr>

<!-- information_eof //-->

 

To get to just the "box", remove the lines that start with "tep_href_link". You'll be left with an empy frame.

 

There are some contributions for adding news in the download area, too.

  • 4 years later...
Posted

What does the "tep_href_link" do/refer to?

 

<!-- information_eof //-->[/code]

To get to just the "box", remove the lines that start with "tep_href_link". You'll be left with an empy frame.

There are some contributions for adding news in the download area, too.

Posted
Probably the easiest one to modify is the information box.

 

here's a bit more specific answer. i'll call the new box "new_box", but you should come up with a better name.

 

back-up first, of course.

 

download and open catalog/includes/boxes/information.php, and save as new_box.php, then modify new_box.php like this:

 

<?php

 

/*

 

$Id: new_box.php

osCommerce, Open Source E-Commerce Solutions

 

http://www.oscommerce.com

Copyright © 2001 osCommerce

Released under the GNU General Public License

 

*/

 

?>

 

<!-- new_box //-->

 

<tr>

 

<td>

 

<?php

 

$info_box_contents = array();

 

$info_box_contents[] = array('align' => 'left',

 

'text' => BOX_HEADING_NEW_BOX

 

);

 

new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();

 

$info_box_contents[] = array('align' => 'left',

 

'text' => BOX_TEXT_NEW_BOX);

 

new infoBox($info_box_contents);

 

?>

 

</td>

 

</tr>

 

<!-- new_box_eof //-->

 

save new_box.php and upload to catalog/includes/boxes

 

then open catalog/includes/languages/english.php and at the end, right before the closing ?> add the following lines:

 

// new_box

define('BOX_HEADING_NEW_BOX', 'Your Box Title');

define('BOX_TEXT_NEW_BOX', '<p>Your HTML goes here</p>');

 

save english.php and upload to catalog/includes/languages

  • 5 months later...
Posted

I think I am starting to understand this a LITTLE bit, however I do have a question...

 

I already have a rss newsfeed from a article directory, and I want to make it look all nice like inside the BOX..

 

More like the whats_new box and less like the information.php box (not a sidebar, or left or right column).

 

I get that you create a simple box like this..

 

 

 

 

<?php

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

 new infoBoxHeading($info_box_contents, false, false);

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

 new infoBox($info_box_contents);
?>

 

Now, what I want to do kinda does a twist of that...

 

I want to do this..

 

<?php

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

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '**insert rss2html rss feed here**'
									);

 new infoBox($info_box_contents);
?>

]

 

I havent yet been able to find anything in the forum to do this... I was hoping to do it with a simple include as I do now (but without the box), but I dont see how I can...

 

Thomas

A signature is something that reflects its user. - The dictionary

 

The question is not, 'to code, or not to code'

the question is, 'if we do not code, are we really alive?'

-- anonymous

  • 6 months later...
Posted
Probably the easiest one to modify is the information box.

<?php

/*

 $Id: information.php,v 1.2 2002/08/31 17:39:34 wilt Exp $
 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com
 Copyright (c) 2001 osCommerce
 Released under the GNU General Public License

*/

?>

<!-- information //-->

         <tr>

           <td>

<?php

 $info_box_contents = array();

 $info_box_contents[] = array('align' => 'left',

                              'text'  => BOX_HEADING_INFORMATION

                             );

 new infoBoxHeading($info_box_contents, false, false);
 $info_box_contents = array();

 $info_box_contents[] = array('align' => 'left',

                              'text'  => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_GV_REDEEM, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');//ICW ORDER TOTAL CREDIT CLASS/GV

 new infoBox($info_box_contents);

?>

           </td>

         </tr>

<!-- information_eof //-->

To get to just the "box", remove the lines that start with "tep_href_link". You'll be left with an empy frame.

There are some contributions for adding news in the download area, too.

 

 

I want to eliminate the Information box and its contents completely as i can have them elsewhere on my hosting pages more easlier than here, found this and thought it would work however it deleted everything except my categories from the front page, so i deleted and reinstalled my backup. i'm now back to where i started still trying to figure out how to delete this box!!!!!

 

any help would be appreciated as at the moment these links to nothing.

koalaphil

Posted
I want to eliminate the Information box and its contents completely

In /catalog/includes/column_left.php

 

Change this:

 

  require(DIR_WS_BOXES . 'information.php');

To:

 

//  require(DIR_WS_BOXES . 'information.php');

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

  • 2 weeks later...

Archived

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

×
×
  • Create New...