Here is something you an TRY. It is a QUICK modification with LITTLE QA testing. No guarantee it will work or not break your Zen Cart installation. Feel free to edit to fit your needs.
Change the file "/includes/modules/pages/page/header_php.php". Replace the following (starting at line 31):
Code:
$var_pageDetails = $db->Execute("select * from " . TABLE_EZPAGES . " where pages_id = " . (int)$ezpage_id );
//check db for prev/next based on sort orders
with the following:
Code:
$var_pageDetails = $db->Execute("select * from " . TABLE_EZPAGES . " where pages_id = " . (int)$ezpage_id );
if ($var_pageDetails->EOF) {
// Start of stuff which may break things (remove all between Start and End in both places if removing)
// Redirect, display error page, or continue
if (MISSING_PAGE_CHECK == 'On' || MISSING_PAGE_CHECK == 'true') {
zen_redirect(zen_href_link(FILENAME_DEFAULT));
}
elseif (MISSING_PAGE_CHECK == 'Page Not Found') {
$_GET['main_page'] = FILENAME_PAGE_NOT_FOUND;
$current_page = $_GET['main_page'];
$current_page_base = $current_page;
$code_page_directory = DIR_WS_MODULES . 'pages/' . $current_page_base;
$page_directory = $code_page_directory;
require($page_directory . '/header_php.php');
}
else {
// End of stuff which may break things
header('HTTP/1.1 404 Not Found');
// Request robots such as search engines to not index the page
$robotsNoIndex = true;
// Start of stuff which may break things
}
// End of stuff which may break things
}
//check db for prev/next based on sort orders