Quote:
Originally Posted by Mr. G
I've read the manual about customizing 404 error pages.
However, I would like my 404 error page to be like (not the same as) a static page, where my custom 404 error message is within the skin, rather than an empty page like it is for the /xcart/skin/common_files/404/404_en.html page. That would be cool!  Also, I do NOT want to do a redirect from the 404 error page either with a meta refresh or a 301 redirect. (Google doesn't like those. Google it.) I don't think I want to use some iframe  either.
The html files for XC static pages (example: /public_html/skin/common_files/pages/en/privacy_statement.html) don't include the necessary includes to display the containing skin/page structure. They are "called" from its parent php file somewhere. Perhaps if I knew where the parent php file was, I could clone and modify it and put it in the /xcart/skin/common_files/404/ folder and it would accomplish this task?
TIA!
|
When the CleanURLs are enabled, the <xcart-dir>/dispatcher.php script handles the '404 Page not found' errors. In this case the error message page is returned by the "func_page_not_found" function which can be found in the <xcart-dir>/include/func/func.core.php script.
In order to make it so that the custom pages of the 'Custom_404_Page' module will be shown, you must add the code below to the beginning of the "func_page_not_found" function in the <xcart-dir>/include/func/func.core.php script:
Code: text
if (is_readable($xcart_dir . '/your-404-error-filename.php')) {
func_header_location('your-404-error-filename.php');
}
That did the trick for me.