Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Where's my Information.php file?


Obiwan2000

Recommended Posts

Posted

hi

 

I've been trying to get to grips with adding a simple box to the mainpage and I've been trying to follow the instructions I found in the osCommerse Knowledge Base on adding and removing boxes. It looks very infomative and concise, but right from the word go I hit a problem.

 

The includes/boxes/information.php file above will be copied to includes/boxes/my_new_box.php and will contain the following with MY_NEW_BOX text changing to the name of your box file and PAGE listings renamed to the new pages that will go in this new box:

 

No such file could be found - the closest I got was information_table.php, and of course it doesn't contain the information I'm told should be there. Am I missing files? Apparently I should have includes/boxes/information.php too, but again, no such file can be found, yet it has to be somewhere because the Information box appears on all pages!

Can anyone help me out?

 

Thanks

Posted

I was able to locate my information.php file. It' in the includes -> boxes directory. If you can't find yours, are you using templates from CRE Loaded software?

Posted
I was able to locate my information.php file. It' in the includes -> boxes directory. If you can't find yours, are you using templates from CRE Loaded software?

 

I guess I must be, whatever that is.

My shop was installed by a 3rd party who is hosting my site.

I don't have a file called information.php anywhere that i can find, so how does that work? What do I do to be able to add a box or two when I want to?

Posted

I have now located my information.php file - well to be precise 8 of them! Even so, I still have a problem. What the knowledge base topic says should be in the file - isn't:-

 

<!-- 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_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_SITEMAP) . '">' . BOX_INFORMATION_SITEMAP . '</a>');

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

 

This isn't what I have found in my information.php file:-

 

 

 

<!-- information //-->
	  <tr>
		<td>
<?php
 $heading = array();
 $contents = array();

 $heading[] = array('text'  => BOX_HEADING_ADDITIONAL,
				 'link'  => tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('selected_box')) . 'selected_box=information'));

 if ($selected_box == 'information' || $menu_dhtml == true) {
$contents[] = array('text'  => tep_admin_files_boxes(FILENAME_INFORMATION_MANAGER, BOX_INFORMATION_MANAGER) .
							   tep_admin_files_boxes(FILENAME_DEFINE_MAINPAGE, BOX_CATALOG_DEFINE_MAINPAGE));
 }

 $box = new box;
 echo $box->menuBox($heading, $contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

 

It just isn't even close, so maybe I could work with it. Even though I have backed everything up, I'm still terrified in diving into something I know very little about and ending up wrecking my store.

 

The same thing goes for the column_left.php file. Apparently it should contain:

 

<?php
 require(DIR_WS_BOXES . 'categories.php');
 require(DIR_WS_BOXES . 'manufacturers.php');
 require(DIR_WS_BOXES . 'whats_new.php');
 require(DIR_WS_BOXES . 'search.php');
 require(DIR_WS_BOXES . 'my_new_box.php');
 require(DIR_WS_BOXES . 'information.php');
?>

 

but my column_left.php file contains:

 

 

  $column_query = tep_db_query('select display_in_column as cfgcol, infobox_file_name as cfgtitle, infobox_display as cfgvalue, infobox_define as cfgkey, box_heading, box_template, box_heading_font_color from ' . TABLE_INFOBOX_CONFIGURATION . ' where template_id = ' . TEMPLATE_ID . ' and infobox_display = "yes" and display_in_column = "left" order by location');
 while ($column = tep_db_fetch_array($column_query)) {

if ( file_exists(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle'])) {
define($column['cfgkey'],$column['box_heading']);
$infobox_define = $column['box_heading'];
$infobox_template = $column['box_template'];
$font_color = $column['box_heading_font_color'];
$infobox_class = $column['box_template'];
//cache control side box detect
if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories4.php') ) {

} else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'manufacturers.php') ) {
 echo tep_cache_manufacturers_box();
} else {
require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle']);
  }
  // end cache control code   
}else{
define($column['cfgkey'],$column['box_heading']);
$infobox_define = $column['box_heading'];
$infobox_template = $column['box_template'];
$font_color = $column['box_heading_font_color'];
$infobox_class = $column['box_template'];
require(DIR_WS_BOXES . $column['cfgtitle']);

}
}
?>

 

I've spent far too long trying to do this - should be a simple thing to do, just to add a new box.

Archived

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

×
×
  • Create New...