Post by phat64mower » Tue May 04, 2021 11:46 pm

Hi Guys,

I would like to be able to customise our Error Page.
We are currently running OC version 3.0.3.1 with a Theme.

In an Ideal World I would like to Create a Customised Information Page and redirect all Users to this page.
I am not sure if this possible and how to do it.

I have been scouring the Forum and havent found a clear answer.

If an Information Page cannot be created, could someone please give me an idea of what can be done and exactly what files to look at and what code to insert to allow some sort of modification.

I have looked at: Layouts and Theme Editor >> Error >> not_found.twig (but ideally dont want to touch this file).

Any help would be very much appreciated.
TIA.

Newbie

Posts

Joined
Fri Jan 09, 2015 9:30 pm

Post by kirkhall » Wed May 05, 2021 9:11 am

since you said any help is appreciated I will give a little.

I cannot give you detailed instructions as I’m not sure what you are looking for when you say you want to customize your error page.
But If you want to change the text that’s displayed when Error >> not_found.twig is needed/displayed on the site just change the text in
catalog/language/en-gb/product/product.php at the line that reads

Code: Select all

$_['text_error']               = 'Product not found!';
to

Code: Select all

$_['text_error']               = 'Example text put here whatever you like (this is dumb but you get the idea!';
This assumes your language is English of course.

Active Member

Posts

Joined
Thu May 22, 2014 11:31 am

Post by paulfeakins » Wed May 05, 2021 4:42 pm

If you can't find an extension, you could pay a developer such as ourselves or post a job in the Commercial Support Forum.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by phat64mower » Wed May 05, 2021 7:55 pm

kirkhall wrote:
Wed May 05, 2021 9:11 am
since you said any help is appreciated I will give a little.

I cannot give you detailed instructions as I’m not sure what you are looking for when you say you want to customize your error page.
But If you want to change the text that’s displayed when Error >> not_found.twig is needed/displayed on the site just change the text in
catalog/language/en-gb/product/product.php at the line that reads

Code: Select all

$_['text_error']               = 'Product not found!';
to

Code: Select all

$_['text_error']               = 'Example text put here whatever you like (this is dumb but you get the idea!';
This assumes your language is English of course.
Hi kirkhall - firstly Thank You very much for your help. A little can go a long way. ;)

Looking at your advice I have found out that the file that I actually need to edit is the catalog/language/en-gb/error/not_found.php

I have done this and cleared cache but unfortunately it does not seem to have worked.
I have gone to the brower and it still shows me the old "The page you requested cannot be found." text at the bottom.
I will keep clearing cache and see if that shows my updated changes.

There is one other issue with this page it shows a left side bar with the following info displayed twice.

Account

>> Login/Register
>>Forgotten Password
>> My Account
>> Address Book
>> Wish List
and so on.

This displays twice on the left directly below one another.
and the "The page you requested cannot be found." text right at the bottom.

I want to remove all of the Account Text and display none of this on the left.

A redirect to a Catalog >> Information page would be the ideal solution. I would then create a completely custom page.

Any ideas?

TIA

Newbie

Posts

Joined
Fri Jan 09, 2015 9:30 pm
Who is online

Users browsing this forum: No registered users and 14 guests