Hi,
I'm running version 1.0.9.0 I need to edit the breadcrumb - the home button to go to adifferent website. I have researched google, all the postings on the user forum and the user guide but cannot figure out how to change the URL the home breadcrumb launches. Currently it is pointing to the wrong URL. When you click on the home icon it launches the following URL - https://getcollectall.com/ but I need to modify it to launch this URL - https://getcollectall.com/SGTW/indexssw.html.
Is this even possible?
Regards....
Editing the Breadcrumb
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: Editing the Breadcrumb
Just about everything is possible
Copy to clipboard, the file /includes/languages/english/modules/content/header/cm_header_breadcrumb.php
Then paste a copy to /templates/override/includes/languages/english/modules/content/header/
This presumes the template that is set in your Admin Dashboard>Configuration>My Store>Template Selection is override
When possible, copying files to your chosen template means it will not be overwritten if that file is changed in a CE Phoenix Cart update. Your template file will remain untouched.
In that pasted file, on Line 17 see:
Code: Select all
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => null,Code: Select all
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'SGTW/indexssw.html',Generally on the forum, if a post provides a working answer, the Thumbs Up icon button in the post should be used to indicate to future readers that it works.
Of course, if someone's time saves your time or helps to develop your store then the Buy Me A Beverage button is also an option
-
jsilling
- Member
- Posts: 7
- Joined: Fri Mar 29, 2024 7:25 pm
- Phoenix Version:
- Has thanked: 3 times
- Been thanked: 1 time
Re: Editing the Breadcrumb
Thanks here are the results of severl variants I tried, First I tried what you wrote
const MODULE_CONTENT_HEADER_BREADCRUMB_TITLES = [
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'SGTW/indexssw.html',
'Catalog' => 'index.php',
Results - Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
then I tried
const MODULE_CONTENT_HEADER_BREADCRUMB_TITLES = [
<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'SGTW/indexssw.html',
];
Shown only the header the rest of the page is blank
then I tried
const MODULE_CONTENT_HEADER_BREADCRUMB_TITLES = [
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'https://getcollectall.com/SGTW/indexssw.html',
'Catalog' => 'index.php',
];
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Then I tried
const MODULE_CONTENT_HEADER_BREADCRUMB_TITLES = [
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'getcollectall.com/SGTW/indexssw.html',
'Catalog' => 'index.php',
];
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Note
Those 4 configuration failed to work I also noticed this path that you refer to for temp storage does not exist:
/templates/override/includes/languages/english/modules/content/header/
At "includes" there is only a template.php file no sub directories of languages/english/modules/content/header - not sure if that is a problem.
I have not loaded any addon's
const MODULE_CONTENT_HEADER_BREADCRUMB_TITLES = [
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'SGTW/indexssw.html',
'Catalog' => 'index.php',
Results - Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
then I tried
const MODULE_CONTENT_HEADER_BREADCRUMB_TITLES = [
<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'SGTW/indexssw.html',
];
Shown only the header the rest of the page is blank
then I tried
const MODULE_CONTENT_HEADER_BREADCRUMB_TITLES = [
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'https://getcollectall.com/SGTW/indexssw.html',
'Catalog' => 'index.php',
];
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Then I tried
const MODULE_CONTENT_HEADER_BREADCRUMB_TITLES = [
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'getcollectall.com/SGTW/indexssw.html',
'Catalog' => 'index.php',
];
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Note
Those 4 configuration failed to work I also noticed this path that you refer to for temp storage does not exist:
/templates/override/includes/languages/english/modules/content/header/
At "includes" there is only a template.php file no sub directories of languages/english/modules/content/header - not sure if that is a problem.
I have not loaded any addon's
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: Editing the Breadcrumb
Create the folder structure if it does not already exist. See https://phoenixcart.org/phoenixcartwiki ... a_Template
Previous post presumes your installation is at https://getcollectall.com as that is what you suggested.
Previously posted suggestion has been tested on a store installed at https://testSiteExample.com (not a real site!)
Edited suggested line to
Code: Select all
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'temp/test.html',You can see how the suggested edit works, it appends whatever is added to the root of your store.
If the information you have provided is correct, the suggested edit is correct.
Can only suggest you check your store structure and root installation.
Right click the Home Icon and copy/paste the link address to a text document before and after edits to see what the link address is.
That might help you to create the correct edit for your installation.
-
jsilling
- Member
- Posts: 7
- Joined: Fri Mar 29, 2024 7:25 pm
- Phoenix Version:
- Has thanked: 3 times
- Been thanked: 1 time
Re: Editing the Breadcrumb
OK First I built the missing sub directories then I followed your instructions.
When I right click on the home button I get this link - https://getcollectall.com/
So I updated the cm_header_breadcrumb.php per your suggestion and right clicked on the home button I get this links - https://getcollectall.com/SGTW/Store/temp/test.html
So then I updated the cm_header_breadcrumb.php with just SGTW/Indexssw.html and right clicked on the home button and get this link - https://getcollectall.com/SGTW/Store/indexssw.html
I did not add STORE to either of the 2 links that I updated but the copy the link gave me in both cases a SGTW/Store - where is that store coming from?
When I right click on the home button I get this link - https://getcollectall.com/
So I updated the cm_header_breadcrumb.php per your suggestion and right clicked on the home button I get this links - https://getcollectall.com/SGTW/Store/temp/test.html
So then I updated the cm_header_breadcrumb.php with just SGTW/Indexssw.html and right clicked on the home button and get this link - https://getcollectall.com/SGTW/Store/indexssw.html
I did not add STORE to either of the 2 links that I updated but the copy the link gave me in both cases a SGTW/Store - where is that store coming from?
-
GetSirius
- Member
- Posts: 50
- Joined: Wed Mar 17, 2021 7:15 pm
- Phoenix Version:
- Has thanked: 14 times
- Been thanked: 2 times
Re: Editing the Breadcrumb
I think "store" was added by Phoenix. No expert here but I just gave it a try using this line:
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'https://getcollectall.com/SGTW/indexssw.html',
'Catalog' => 'index.php',
That resulted in the link becoming: https://mywebsite.com/store/https://getcollectall.com/SGTW/indexssw.html
It appears that the link must be a location inside your store, not a link to an external page. The "https://mywebsite.com/store/" part was added by Phoenix.
Probably not the best way to do things but maybe this would work for you. Place the target page inside your store root directory, then just use indexssw.html. When I did this in my test site:
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'testpage.html',
'Catalog' => 'index.php',
I was successfully taken to my test page:
https://mywebsite.com/store/testpage.html
This all relates to what heatherbell said: "You can see how the suggested edit works, it appends whatever is added to the root of your store."
THEN I added to my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
</IfModule>
Redirect 301 /store/testpage.html https://www.mywebsite.com/testpage.html
That resulted in success. When I clicked on the home page icon I was taken to https://www.mywebsite.com/testpage.html
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'https://getcollectall.com/SGTW/indexssw.html',
'Catalog' => 'index.php',
That resulted in the link becoming: https://mywebsite.com/store/https://getcollectall.com/SGTW/indexssw.html
It appears that the link must be a location inside your store, not a link to an external page. The "https://mywebsite.com/store/" part was added by Phoenix.
Probably not the best way to do things but maybe this would work for you. Place the target page inside your store root directory, then just use indexssw.html. When I did this in my test site:
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'testpage.html',
'Catalog' => 'index.php',
I was successfully taken to my test page:
https://mywebsite.com/store/testpage.html
This all relates to what heatherbell said: "You can see how the suggested edit works, it appends whatever is added to the root of your store."
THEN I added to my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
</IfModule>
Redirect 301 /store/testpage.html https://www.mywebsite.com/testpage.html
That resulted in success. When I clicked on the home page icon I was taken to https://www.mywebsite.com/testpage.html
-
jsilling
- Member
- Posts: 7
- Joined: Fri Mar 29, 2024 7:25 pm
- Phoenix Version:
- Has thanked: 3 times
- Been thanked: 1 time
Re: Editing the Breadcrumb
OK I think we are thinking along the same line. Instead of CE Phoenix being a sub directory (STORE) to getcollectall I reinstalled CEP in a new directory SSWS and then added code for the main web page getcollectall. Everything installed without an issue so now I will rebuild the CEP store information. I thought of copying PHP files from the old CEP install to the new one but thought there may be sub hooks and then I would have to trouble shoot them - so instead start with a fresh install of CEP. Luckly there was not a lot in the old CPE store as it was part of a protype so rebuilding what I created in the original CPE store should not take long and with the knowledge I have gained in the last 2 weeks should only take a few hours. I'll update you as to my success later today.
-
jsilling
- Member
- Posts: 7
- Joined: Fri Mar 29, 2024 7:25 pm
- Phoenix Version:
- Has thanked: 3 times
- Been thanked: 1 time
Re: Editing the Breadcrumb
BANG! That got it, changing the structure of the server set up and then modifying the cm_header_breadcrumb.php to:
const MODULE_CONTENT_HEADER_BREADCRUMB_TITLES = [
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'indexssw.html',
'Catalog' => 'index.php',
];
Fixed the issue and now it works as I had hoped, now time to rebuild the CEP store!
const MODULE_CONTENT_HEADER_BREADCRUMB_TITLES = [
'<i class="fas fa-home"></i><span class="sr-only"> Home</span>' => 'indexssw.html',
'Catalog' => 'index.php',
];
Fixed the issue and now it works as I had hoped, now time to rebuild the CEP store!
-
jsilling
- Member
- Posts: 7
- Joined: Fri Mar 29, 2024 7:25 pm
- Phoenix Version:
- Has thanked: 3 times
- Been thanked: 1 time
Re: Editing the Breadcrumb
All done and working the way it should - https://getcollectall.com/SSWS/index.php