Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding a new Defined Page

Adding a new Defined Page

Views: 600

Results 1 to 7 of 7
15 Aug 2011, 10:44 PM
#1
rolo550 avatar

rolo550

New Zenner

Join Date:
Jul 2011
Posts:
50
Plugin Contributions:
0

Adding a new Defined Page

So, my addign a link worked as per Dr. Byte,

Lets say my link reads

$information[] = '<a href="http://www.misterguns.com/catalog/index.php?main_page=potato">Testopotomus</a>';

How do I create a page called potato and make the link work?

looking at another example, lets say conditions. i see

<li><a href="http://www.misterguns.com/catalog/index.php?main_page=conditions">Conditions of Use</a></li>

I see a conditions.php in the includes/languages/english folder

I see the text is in define_conditions under the includes/languages/english/HTML_Included folder but i fail to see how the .../index.php?main_page=conditions" makes the connection to the DEFINE_CONDITIONS page.

I want to make a DEFINE_POTATO.php and have it link...whats the way to do that?

16 Aug 2011, 12:00 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,611
Plugin Contributions:
0

Re: Adding a new Defined Page

Moderator's note: Post moved to a thread of its own.

Have a look in the Free AddOns - Look for the "About Us" addon - follow the same principals to create your own pages.

16 Aug 2011, 2:51 AM
#3
rolo550 avatar

rolo550

New Zenner

Join Date:
Jul 2011
Posts:
50
Plugin Contributions:
0

Re: Adding a new Defined Page

Is there not a simpler way? Not being lazy, just asking...

To be more specific, Ill just manually add the link. I don't need the SQL and the PHP If statements. Which parts are what is relevant to just define the page (within the about us plugin)?

16 Aug 2011, 4:38 AM
#4
rolo550 avatar

rolo550

New Zenner

Join Date:
Jul 2011
Posts:
50
Plugin Contributions:
0

Re: Adding a new Defined Page

so I have been over and over the about us, as well as digging through the "conditions" files to try to determine what the structure is. Admittedly I'm not so good at PHP.

Using the About US and other examples in the site, I cannot figure out the structure.

I know that filenames.php and header_php.php are related to pulling the correct files. I know that conditions and define_conditions are called by the TPL_Conditions_default.php, but for the life of me I cant figure out what is going on.

What calls what that calls what? The About_Us readme hasn't done much to help except sort of point out what files i need to look for.

Please help, I really am trying to help myself, but I just need a bone...if i can just understand the structure it would make all the difference...

16 Aug 2011, 5:52 AM
#5
rolo550 avatar

rolo550

New Zenner

Join Date:
Jul 2011
Posts:
50
Plugin Contributions:
0

Re: Adding a new Defined Page

Also

in a link like

a href="http://www.misterguns.com/catalog/index.php?main_page=conditions

what does 'conditions' correspond to - where is that tied in with the link in some other page?

16 Aug 2011, 6:02 PM
#6
rolo550 avatar

rolo550

New Zenner

Join Date:
Jul 2011
Posts:
50
Plugin Contributions:
0

Re: Adding a new Defined Page

Any comments?

18 Aug 2011, 2:29 AM
#7
rolo550 avatar

rolo550

New Zenner

Join Date:
Jul 2011
Posts:
50
Plugin Contributions:
0

Re: Adding a new Defined Page

After hours of digging, no thanks to the cryptic minimally helpful about_us module readme.txt, I managed to figure it out on my own how do do this. Here is the procedure for the rest of you guys that only get pointed to a module with no further help...

Adding a page to the information box

  1. Edit Catalog\includes\templates\mytemplate\modules\sideboxes\information.php

Add

$information[] = ‘<ahref="http://www.mydomain.com/catalog/index.php?main_page=chl">CHL</a>';

Above where it says:

if (DEFINE_SHIPPINGINFO_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a>';

For the sake of this discussion the added page will be called “CHL”

  1. Edit includes\filenames.php and add
    define('FILENAME_CHL', 'chl');
    define('FILENAME_DEFINE_CHL', 'define_chl');

  2. Go to includes\modules\pages and copy an existing folder like “conditions” and rename it to the page name, in this case “chl” would be the folder name

  3. Open the header_php.php file in the chl folder and edit the line that says:

    FILENAME_DEFINE_CONDITIONS (because we copied the “conditions’ folder) , replacing it with FILENAME_DEFINE_CHL

  4. Copy some file like includes\templates\template_default\templates tpl_conditions_default rename it to tpl_chl_default.php

remove the if statements making the text look like this:

<div class="centerColumn" id="chl"> <h1 id="chlHeading"><?php echo HEADING_TITLE; ?></h1> <div id="chlMainContent" class="content"> <?php /** * require the html_define for the shippinginfo page */ require($define_page); ?> </div>
  1. Move your tpl_chl_default to includes\templates\mytemplate\templates

  2. Copy a file like includes\languages\english\html_includes\define_conditions.php to includes\languages\english\html_includes\mytemplate and rename it to define_chl.php

Edit text and html to your liking

  1. Copy a file like “conditions.php” to includes\languages\english\mytemplate and rename to chl.php. Edit the navbar and heading text to your liking

Done!!!