184.108.40.206. Setting up a 404 page in OpenCart
In OpenCart, the 404 error page is generated directly in the CMS, which is why the setup instructions your 404 page will not give the desired result.
You can create your 404 page in OpenCart by:
To change the layout of your 404 page, do the following:
- Go to section "Design → Layouts":
- Add a new layout by clicking "+":
- Specify the data for creating the layout:
- "Layout name" — specify an arbitrary name for the layout.
- In a table with columns "Invoice" and "Way" click "+" and in the field "Invoice" select your active store, and in the field "Way" indicate
- In chapter "Select the location of the modules" clicking on "+" you can add a block with the desired element to the desired panel. The choice of such blocks must be done at your own discretion.
- Save your changes.
To change the text of the 404 page, you need to change the file
catalog\language\ru-ru\error\not_found.phpwhere instead of
ru-ruyou need to specify the language you are using.
Only a few parameters will be specified in the file:
// Heading $_['heading_title'] = 'The requested page was not found!';
- Page text:
// Text $_['text_error'] = 'Sorry, the page you requested was not found. Probably, you specified a non-existent address, the page was deleted, moved or is now temporarily unavailable!';
Both parameters can be changed to suit your needs. If you want to add any styles or pictures, you can use the standard HTML-tags. For example, to display a picture, you can do this:
<?php // Heading $_['heading_title'] = 'The requested page was not found!'; // Text $_['text_error'] = 'Sorry, the page you requested was not found. <img src = "https://example.com/404.png">';