Making a new page

Open to all! Ask other shopowners for help.
Post Reply
Dnj1964
Member
Posts: 54
Joined: Fri Nov 06, 2020 8:27 pm
Phoenix Version:
Has thanked: 8 times

Making a new page

Post by Dnj1964 »

Checked the user guide and the code has changed significantly and changing name doesn't seem to work anymore. I am working with 1.0.8.6

Is there another file that must be updated/changed to reflect the new page naming?
Could probably just do it with a new info page but hoping to make a new page

Thanks, Doug


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Making a new page

Post by ecartz »

Those instructions are missing the template file: templates/default/includes/pages/privacy.php (in that example).
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Making a new page

Post by heatherbell »

Dnj1964 wrote: Fri Oct 29, 2021 1:07 am Checked the user guide and the code has changed significantly and changing name doesn't seem to work anymore. I am working with 1.0.8.6
So, I have just updated that User Guide page - tell me if and how it can be improved.
Dnj1964
Member
Posts: 54
Joined: Fri Nov 06, 2020 8:27 pm
Phoenix Version:
Has thanked: 8 times

Re: Making a new page

Post by Dnj1964 »

heatherbell wrote: Fri Oct 29, 2021 7:52 am
Dnj1964 wrote: Fri Oct 29, 2021 1:07 am Checked the user guide and the code has changed significantly and changing name doesn't seem to work anymore. I am working with 1.0.8.6
So, I have just updated that User Guide page - tell me if and how it can be improved.
My includes/languages/english/privacy.php is as below so the seo described is no longer applicable

Otherwise Thanks to both @ecartz and @heatherbell for taking the time to help. Very much appreciated. Changing the template file worked perfectly.

Code: Select all

<?php
/*
  $Id$

  CE Phoenix, E-Commerce made Easy
  https://phoenixcart.org

  Copyright (c) 2021 Phoenix Cart

  Released under the GNU General Public License
*/

const NAVBAR_TITLE = 'Privacy Notice';

/*
Define the Title and Text of this page using the Info Pages Manager.
Admin > Tools > Info Pages
*/
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Making a new page

Post by heatherbell »

Dnj1964 wrote: Fri Oct 29, 2021 8:22 pm My includes/languages/english/privacy.php is as below so the seo described is no longer applicable
Not sure why you would state that as a fact.
I'm well aware of the current language file as that is what is used in the screenshot on that page.
I think it is still applicable unless metadata is not required, though why publish a page without metadata?
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Making a new page

Post by ecartz »

The SEO stuff is optional. But if you put it in, the software will use it. The privacy page does not use it, because who wants to promote their privacy page? But if you want search engines to show a nice title and description in their results, it is helpful. It may or may not be helpful in terms of ranking. Google has largely moved to an analytics-based structure, where they rank highly the sites that get most clicked from the search results when shown. A descriptive title and description may help with that.

It may help with long tail results due to keyword analysis. I.e. when there isn't enough analytic data, they may fall back on keyword analysis.
Dnj1964
Member
Posts: 54
Joined: Fri Nov 06, 2020 8:27 pm
Phoenix Version:
Has thanked: 8 times

Re: Making a new page

Post by Dnj1964 »

@heatherbell was kind to enough to package up the drop down menu she created for phoenixcart.org.

Installed and it was added to the Navbar perfectly.

For the new page copied privacy.php from 3 locations
/privacy.php
/includes/languages/english/privacy.php
/templates/default/includes/pages/privacy.php
Changed names accordingly and added to the drop menu.

Clicking link in drop down opens the blank page as expected with the navbar, header, left and right columns as expected.

And shows the "Continue" as the privacy, conditions, and shipping files do.

Cloned privacy.php with 3 different names and was expecting to edit these files in admin/info pages but they don't show up.

I have cleared cache, rebooted, and they still don't show up.

Checked the pages and pages_description tables in the db and they aren't there either.

Am I missing something, do I need to edit these pages manually?
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Making a new page

Post by ecartz »

You have to add them in admin before they show up. I.e. when you are looking at the list that shows privacy, conditions, and shipping, click the button that says "Add a New Page". Remember that the slug has to match the one in the template file (or the id does if you load by ID).


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply