Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

A template with no Infoboxes !!


holyland

Recommended Posts

Hello all,

 

I'm developing a store, with a template i purchased from TM.

 

The problem is that the template has no infoboxes at all!! and i spend the last 8 hours trying to figure out the way to add one and i ended up with no results.

 

column_left.php and column_right.php have the correct definition for boxes(i guess), but the store shows nothing.

 

I noticed that in index.php it doesn't call neither column_left.php not column_right.phpand if i try to add

<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_left.php'); ?>
<!-- right_navigation_eof //-->
</table></td>

i get an error saying

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/******/public_html/includes/header.php:192) in /home/******/public_html/includes/boxes/categories.php on line 59

 

header.php

.
.
.
<?   // ---- CATEGORIES

***this is line 192---->  function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array;

  if(!$tree[$counter]['level']){
//$categories_string .= $categories_string ? '<tr><td colspan=2><img src=images/m13.gif width=169 height=1><br><br class=px3></td></tr>' : '';  
.
.
.

 

 

/includes/boxes/categories.php

.
.
.
// display category name
$categories_string .= $tree[$counter]['name'];

if (isset($cPath_array) && in_array($counter, $cPath_array)) {
  $categories_string .= '</b>';
}

if (tep_has_category_subcategories($counter)) {
  $categories_string .= '->';
}

$categories_string .= '</a>';

if (SHOW_COUNTS == 'true') {
  $products_in_category = tep_count_products_in_category($counter);
  if ($products_in_category > 0) {
	$categories_string .= ' (' . $products_in_category . ')';
  }
}

$categories_string .= '<br>';

if ($tree[$counter]['next_id'] != false) {
  tep_show_category($tree[$counter]['next_id']);
}
*****this is line 59---->  }
?>
<!-- categories //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 new infoBoxHeading($info_box_contents, true, false);

 $categories_string = '';
 $tree = array();
.
.
.

 

this is not just-this-case problem .. it seems as a general problem that i don't have any infobox

 

i wonder if someone can help me .. please

Link to comment
Share on other sites

Hello all,

 

I'm developing a store, with a template i purchased from TM.

 

The problem is that the template has no infoboxes at all!! and i spend the last 8 hours trying to figure out the way to add one and i ended up with no results.

 

column_left.php and column_right.php have the correct definition for boxes(i guess), but the store shows nothing.

 

I noticed that in index.php it doesn't call neither column_left.php not column_right.phpand if i try to add

<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_left.php'); ?>
<!-- right_navigation_eof //-->
</table></td>

i get an error saying

header.php

.
.
.
<?   // ---- CATEGORIES

***this is line 192---->  function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array;

  if(!$tree[$counter]['level']){
//$categories_string .= $categories_string ? '<tr><td colspan=2><img src=images/m13.gif width=169 height=1><br><br class=px3></td></tr>' : '';  
.
.
.

/includes/boxes/categories.php

.
.
.
// display category name
$categories_string .= $tree[$counter]['name'];

if (isset($cPath_array) && in_array($counter, $cPath_array)) {
  $categories_string .= '</b>';
}

if (tep_has_category_subcategories($counter)) {
  $categories_string .= '->';
}

$categories_string .= '</a>';

if (SHOW_COUNTS == 'true') {
  $products_in_category = tep_count_products_in_category($counter);
  if ($products_in_category > 0) {
	$categories_string .= ' (' . $products_in_category . ')';
  }
}

$categories_string .= '<br>';

if ($tree[$counter]['next_id'] != false) {
  tep_show_category($tree[$counter]['next_id']);
}
*****this is line 59---->  }
?>
<!-- categories //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 new infoBoxHeading($info_box_contents, true, false);

 $categories_string = '';
 $tree = array();
.
.
.

 

this is not just-this-case problem .. it seems as a general problem that i don't have any infobox

 

i wonder if someone can help me .. please

 

1. contact the compoany where you bought the tempate for support.

 

2. the error you get is because when you added in the columns into the index.php file again the categories box is included twice, both in header.php and column_left.php

Link to comment
Share on other sites

Comment out this code and like this, in column_left.php:

 

/*
 if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_categories_box();
 } else {
include(DIR_WS_BOXES . 'categories.php');
 }
*/

 

And any other that is giving the same error.

Link to comment
Share on other sites

Comment out this code and like this, in column_left.php:

 

CODE

 

/*

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_categories_box();

} else {

include(DIR_WS_BOXES . 'categories.php');

}

*/

 

 

And any other that is giving the same error.

 

You r rock mate .. that solves the coulmn show

 

i have to make it compatible with the template

 

thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...