We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.13.4.18. 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:
  1. Go to the section "Design → Layouts»:
  2. Add a new layout by clicking "+»:
  3. Specify the data for creating the layout:
    1. «Layout name"- specify an arbitrary name for the layout.
    2. In a table with columns "Score"And"Way»Click«+"And in the field"Score"Select your active store, and in the field"Way»Specify error/not_found.
    3. In section "Select module location"By 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.
  4. 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-ru you need to specify the language you are using.

The file will contain only a few parameters:

  • Title:
    // 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">';