I want to buy one from this site, for example this one: http://themeforest.net/item/simplistic-404/1538456
But I don't know if it's possible to insert ir or how to do it, can anybody help me?
Thanks in advance
(I have the 1.5.1.3.1 Opencart version.)
Download the custom 404 page you want, edit it to suit your website (e.g. colours links etc.). Once you've done that, copy all the coding (including styling) and paste it into the not_found.tpl file located in catalog/view/theme/yourthemename/template/error/
Paste the code within <div class="content"> </div> and be sure to de-activate or delete this <?php echo $text_error; ?> - to de-active, replace this:
Code: Select all
<?php echo $text_error; ?>
Code: Select all
<!--<?php echo $text_error; ?>-->
Cheers, Sam
As soon as I buy the custom page I will install it and tell you how it went!
Thanks
I've been searching the forums for an answer and the closest I've found is this:
http://forum.opencart.com/viewtopic.php?f=20&t=20507
The code posted is for an older version of opencart and doesn't support seo url's as per the author. Just wondering if anyone has found a working solution to what should be an easy peasy fix?
~
Install Extensions OR OpenCart Fast Service! PayPal Accepted
I will professionally install and configure any free or purchased theme, module or extension.
Visit http://www.mrtech.ca if you need an OpenCart webmaster
~
The not_found.tpl file is only for 404 errors in version 1.4.x and 1.5.x and you can safely edit this file, it will not affect the cart or any other errors pages as these are made using their respective controller.
This is the file I modified:
Code: Select all
catalog\view\theme\default\template\error\not_found.tpl
Code: Select all
<div class="content"><?php echo $text_error; ?></div>
Code: Select all
<div class="content"><?php echo $text_error; ?>HELLO WORLD!</div>
Can someone else test the above and let me know your results? Thanks!
~
Install Extensions OR OpenCart Fast Service! PayPal Accepted
I will professionally install and configure any free or purchased theme, module or extension.
Visit http://www.mrtech.ca if you need an OpenCart webmaster
~
here's what to do, create a 2nd copy of '/catalog/controller/view/default/template/error/not_found.tpl' called 'error_404.tpl'
In the file 'catalog/controller/error/not_found.php', replace
Code: Select all
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
} else {
$this->template = 'default/template/error/not_found.tpl';
}
Code: Select all
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/error_404.tpl')) {
$this->template = $this->config->get('config_template') . '/template/error/error_404.tpl';
} else {
$this->template = 'default/template/error/error_404.tpl';
}
~
Install Extensions OR OpenCart Fast Service! PayPal Accepted
I will professionally install and configure any free or purchased theme, module or extension.
Visit http://www.mrtech.ca if you need an OpenCart webmaster
~
I have done everything said here, but I dont have an error_404.tpl page, only an error_404.php page, can I edit the PHP file as I please or have I missed a step?
Also, my URL is livinthing.com , if I add /test123 , should an error page appear ? because when this happens to me I get
Not Found
The requested URL /test123 was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Any ideas on how I can fix this and get a propper error 404 page which I can edit?
@smifis
You said:
If the file to be copied has the extension .tpl shouldn't the second file be .tpl as well or is it really .php?here's what to do, create a 2nd copy of '/catalog/controller/view/default/template/error/not_found.tpl' called 'error_404.php'
Just want to be sure
tks
Cleo
Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)
open file /catalog/controller/error/not_found.php
add "//" before this line
$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found');
like this:
//$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found');
Step 2:
open file /catalog/controller/view/your_current_theme/template/error/not_found.tpl to modify what you want to show.
That the way I do with my site http://www.d-city.net. Hope this way could help you!
www.d-city.net | Danang shopping online
Users browsing this forum: Amazon [Bot], Baidu [Spider], Google [Bot] and 116 guests