This is the PHP in includes/classes/site_map.php. As you can see it already contains the lines you suggest could be wrong in my site_map.php file.
PHP Code:
<?php/** * site_map.php * * @package general * @copyright Copyright 2003-2018 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: Drbyte Mon Nov 5 09:42:04 2018 -0500 Modified in v1.5.6 $ */if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access');}/** * site_map.php * * @package general */ class zen_SiteMapTree { var $root_category_id = 0, $max_level = 0, $data = array(), $root_start_string = '', $root_end_string = '', $parent_start_string = '', $parent_end_string = '', $parent_group_start_string = "\n<ul>", $parent_group_end_string = "</ul>\n", $child_start_string = '<li>', $child_end_string = "</li>\n", $spacer_string = '', $spacer_multiplier = 1;
function __construct() { global $db; $this->data = array(); $categories_query = "select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' and c.categories_status != '0' order by c.parent_id, c.sort_order, cd.categories_name"; $categories = $db->Execute($categories_query); while (!$categories->EOF) { $this->data[$categories->fields['parent_id']][$categories->fields['categories_id']] = array('name' => $categories->fields['categories_name'], 'count' => 0); $categories->MoveNext(); } }
function buildBranch($parent_id, $level = 0, $parent_link = '') { $result = $this->parent_group_start_string;
if (isset($this->data[$parent_id])) { foreach ($this->data[$parent_id] as $category_id => $category) { $category_link = $parent_link . $category_id; $result .= $this->child_start_string; if (isset($this->data[$category_id])) { $result .= $this->parent_start_string; }
if ($level == 0) { $result .= $this->root_start_string; } $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link) . '">'; $result .= $category['name']; $result .= '</a>';
if ($level == 0) { $result .= $this->root_end_string; }
if (isset($this->data[$category_id])) { $result .= $this->parent_end_string; }
// $result .= $this->child_end_string;
if (isset($this->data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1))) { $result .= $this->buildBranch($category_id, $level+1, $category_link . '_'); } $result .= $this->child_end_string;
} }
$result .= $this->parent_group_end_string;
return $result; } function buildTree() { return $this->buildBranch($this->root_category_id); }//-bof-zca_bootstrap *** 1 of 1 *** public function setParentStartEndStrings($start, $end = "</ul>\n") { $this->parent_group_start_string = $start; $this->parent_group_end_string = $end; } public function setChildStartString($start, $end = "</li>\n") { $this->child_start_string = $start; $this->child_end_string = $end; }//-eof-zca_bootstrap *** 1 of 1 *** }

Originally Posted by
OldNGrey
I can reproduce the error by using the original ZC 156c site_map.php in \includes\classes\.
This needs to be edited or replaced with site_map.php provided in the Bootstrap template.
The lines from approximately line 93, starting with "//-bof-zca_bootstrap *** 1 of 1 ***" must be in the file.
--------
environment Dev: Zen Cart 156c; Apache 2.4.33; PHP 7.3.1; MySQL 5.7.21; Windows 10
environment Test: Zen Cart 156a; Apache 2.4.29; PHP 7.2.4; MySQL 5.7.24; Linux 4.15.0
packages / add-ons:
ckeditor ; clone template 1.2.0; payment module fee; Direct bank Deposit V1.5.revised; zencart155 securepayxml (modified); ozpost v4.2.7;
ceon_back_in_stock_notifications.9 (modified); export_shipping_information_V1.3.5 (modified); edit_orders-4.3.5; master password 4; admin log in as customer; ZCA bootstrap template-for-156-v2.0.0c; image checker 2.0; sales report 3.2.2; email archive manager 1-8e; zenNoncaptcha v0.5
Bookmarks