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.
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
to
This assumes your language is English of course.
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!';
Code: Select all
$_['text_error'] = 'Example text put here whatever you like (this is dumb but you get the idea!';
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
Guru Member
Hi kirkhall - firstly Thank You very much for your help. A little can go a long way.kirkhall wrote: ↑Wed May 05, 2021 9:11 amsince 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
toCode: Select all
$_['text_error'] = 'Product not found!';
This assumes your language is English of course.Code: Select all
$_['text_error'] = 'Example text put here whatever you like (this is dumb but you get the idea!';
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
Who is online
Users browsing this forum: Bing [Bot] and 517 guests