Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding to the Information Box


everyth5

Recommended Posts

I have added the "About Us" coding to the Information.php file as below:

 

$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_ABOUTUS) . '">' . BOX_INFORMATION_ABOUTUS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_OUR_PRODS) . '">' . BOX_INFORMATION_OUR_PRODS . '</a><br>' .

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

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

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_

 

 

but I am missing something because I get the wrong output in the information box on the site. I get

 

Shipping & Returns

BOX_INFORMATION_ABOUTUS

About Our Products

Privacy Notice

Contact Us

 

Can someone point me in the right direction? I know there is an easier way than adding a contribution, I did it before but cannot remember.

 

Thanks

Link to comment
Share on other sites

you have to define it in english.php copy how the contact us is and everything will be ok

 

Thanks Eric. I have the following:

 

In information.php

'<a href="' . tep_href_link(FILENAME_ABOUT_US) . '">' . BOX_INFORMATION_ABOUT_US . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_OUR_PRODS) . '">' . BOX_INFORMATION_OUR_PRODS . '</a><br>' .

 

In about_us.php

require('includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ABOUTUS);

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUTUS));

?>

 

In english.php

// information box text in includes/boxes/information.php

define('BOX_HEADING_INFORMATION', 'Information');

define('BOX_INFORMATION_ABOUT_US', 'About Us');

define('BOX_INFORMATION_OUR_PRODS','About Our Products');

 

 

and am still getting errors. This http://everything-asian.com/FILENAME_ABOUT_US is in the address on top and I get a HTTP 404 Not Found error when I try to go there.

Link to comment
Share on other sites

in your catalog dir. for your about us page copy the contents of the privacy.php and rename the top or the file about us

 

then in your english dir about us.php copy the contents of privacy.php and change the text to your about us info.

 

then in inlcudes/filenames.php add the new filename

 

that should about rap it up

Link to comment
Share on other sites

in your catalog dir. for your about us page copy the contents of the privacy.php and rename the top or the file about us

 

then in your english dir about us.php copy the contents of privacy.php and change the text to your about us info.

 

then in inlcudes/filenames.php add the new filename

 

that should about rap it up

 

Well Eric, I don't know what I am doing wrong. Still getting the HTTP 404 error.

Link to comment
Share on other sites

I tried changing the file name in english.php and get the following error

 

Warning: main(includes/languages/english/about_us.php) [function.main]: failed to open stream: No such file or directory in /home/everyth5/public_html/about_us.php on line 15

 

Fatal error: main() [function.require]: Failed opening required 'includes/languages/english/about_us.php' (include_path='.:/usr/lib/php') in /home/everyth5/public_html/about_us.php on line 15

 

I have about_us.php in catalog/ and is an exact copy of privacy.php there with the following lines changed

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ABOUT_US);

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US));

?>

 

aboutus.php in catalog/includes/languages/english and is an exact copy of privacy.php (just the text changed)

 

defined about_us.php in english.php as

 

// information box text in includes/boxes/information.php

 

define('BOX_HEADING_INFORMATION', 'Information');

define('BOX_INFORMATION_ABOUT_US', 'About Us');

define('BOX_INFORMATION_OUR_PRODS','About Our Products');

define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');

define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');

define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');

define('BOX_INFORMATION_CONTACT', 'Contact Us');

 

and the following defined in filenames.php

define('FILENAME_ABOUT_US', 'about_us.php');

 

am I missing something???

Link to comment
Share on other sites

for the catalog/about_us.php you should have this

<?php
/*
 $Id: about_us.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ABOUT_US);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.5
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.5
?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><?php echo TEXT_INFORMATION; ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
</table></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

In your catalog>includes>lang.>english>about_us.php you should have

<?php
/*
 $Id: about_us.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $

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

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'About Us');
define('HEADING_TITLE', 'About Us');

define('TEXT_INFORMATION', 'YOUR TEXT HERE.');
?>

 

In your catalog>includes>lang.>english.php

You are correct

 

In catalog>includes>filenames.php you should have(add to bottom for easy finding)

define('FILENAME_ABOUT_US', 'about_us.php');

 

 

In the catalog>includes>boxes>information.php you should have

<?php
/*
 $Id: 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
*/
?>
<!-- information //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_ABOUT_US) . '">' . BOX_INFORMATION_ABOUT_US . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

 

This should put a link to your about us page in your infomation box

Link to comment
Share on other sites

  • 4 months later...
No Problem, any time.

 

Eric

 

Kelvin

 

Did you know what you had incorrect, because I have the exact same problem and have gone through this thread many times, but cannot cure it.

The link works OK but the text says BOX_INFORMATION_ABOUT_US

 

Steve

Link to comment
Share on other sites

Kelvin

 

Did you know what you had incorrect, because I have the exact same problem and have gone through this thread many times, but cannot cure it.

The link works OK but the text says BOX_INFORMATION_ABOUT_US

 

Steve

 

 

You need to define the text in your includes/l;ang/english file where all the other defines are for the information box. Find the following bit of code and copy one of the other defines then alter it

 

// information box text in includes/boxes/information.php

 

Your line of code will look something like

 

define('BOX_INFORMATION_ABOUT_US, 'About Us');

 

Hope this works.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

You need to define the text in your includes/l;ang/english file where all the other defines are for the information box. Find the following bit of code and copy one of the other defines then alter it

 

// information box text in includes/boxes/information.php

 

Your line of code will look something like

 

define('BOX_INFORMATION_ABOUT_US, 'About Us');

 

Hope this works.

 

I have got that in my includes/lang/english.php file.

 

// information box text in includes/boxes/information.php

define('BOX_HEADING_INFORMATION', 'Information');

define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');

define('BOX_HEADING_ABOUT', 'About Us');

define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');

define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');

define('BOX_INFORMATION_CONTACT', 'Contact Us');

 

I copied the privacy line in all the files mentioned above and then edited, this is why I cannot see why it wont read the correct info.

 

in the catalog/includes/boxes/information.php I have

 

 

$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

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

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

'<a href="' . tep_href_link(FILENAME_ABOUT) . '">' . BOX_INFORMATION_ABOUT . '</a><br>' .

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

 

new infoBox($info_box_contents);

 

 

I have then copied the privacy.php file in catalog and catalog/includes/lang/english, renamed them about.php and edited these. I think this bit works because the link is working OK, its just the text is wrong on the link.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...