Making Page_5 work

Results 1 to 20 of 42
11 Jan 2008, 13:22
#1
gayelston avatar

gayelston

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

Making Page_5 work

Hi,
I've added posts to several different threads on this issue, but I haven't had a reply as yet, so I thought I'd start a new thread & see if it helped.
I want to add a few new pages in the More_information sidebox, so I cloned Page_2 in every place I could find it using Developers Tool Box & 2 that I didn't.
I originally copied Kobra's post from about 2005, but I've added to it.
I will past it below, with all the changes I've made listed with the places where they were put.

Creating new pages in Zen Cart, AD 2005

For illustration use the page_2 as a guide
Try starting over and in these areas edit or create what is required changing only the reference to page_2 to

page_5...get it to work in that default generic form before you begin changing things like "Zimbabwe Orphans Endeavor'"
Just the straight page_5 references to start.

Create/clone these as page_5

/admin/includes/languages/english.php ( one line: define('BOX_TOOLS_DEFINE_PAGE_5','Page 5'); )

/admin/includes/languages/english/define_page_editor.php ( one line: define('TEXT_INFO_PAGE_5', 'Page 5'); )

/includes/modules/pages/page_2/header_php.php ( cloned folder, changed folder name & edited

heager_php.php as follows: <?php
/**
* Page 5
*
* @package page
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $
*/
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
$breadcrumb->add(NAVBAR_TITLE);

// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/',

FILENAME_DEFINE_PAGE_5, 'false');
?>

/includes/languages/english/page_2.php (cloned & edited as follows:
<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers |
// | |
// | http://www.zen-cart.com/index.php |
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | [email protected] so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id: page_5.php 1969 2005-09-13 06:57:21Z drbyte $
//

define('NAVBAR_TITLE', 'Directories');
define('HEADING_TITLE', 'Search Engine Directories');

define('TEXT_INFORMATION', 'A list of directories that you might find helpful');
?>

/includes/templates/template_default/templates/tpl_page_2_default.php ( cloned & edited as follows:
<?php
/**
* tpl_page_5_default.php
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_page_5_default.php 3464 2006-04-19 00:07:26Z ajeh $
*/
?>
<div class="centerColumn" id="pageFive">
<h1 id="pageFiveHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if (DEFINE_PAGE_5_STATUS >= 1 and DEFINE_PAGE_5_STATUS <= 2) { ?>
<div id="pageFiveMainContent" class="content">
<?php
/**
* require the html_define for the page_5 page
*/
require($define_page);
?>
</div>
<?php } ?>
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>';

?></div>
</div>

Add/edit these to include page_5
/includes/modules/sideboxes/more_information.php ( entry for Page_2 cloned & edited to read:
if (DEFINE_PAGE_5_STATUS <= 1) {
$more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_5) . '">' . BOX_INFORMATION_PAGE_5 . '</a>';
}

/includes/languages/english.php ( this added: define('BOX_INFORMATION_PAGE_5', 'Directories'); )

/includes/filenames.php ( 2 statements added, first: define('FILENAME_DEFINE_PAGE_5',

'define_page_5'); then: define('FILENAME_PAGE_5', 'page_5'); )

/includes/templates/template_default/templates/tpl_site_map_default.php ( statement added:
<?php if (DEFINE_PAGE_5_STATUS <= 1) { ?>
<li><?php echo '<a href="' . zen_href_link(FILENAME_PAGE_5) . '">' . BOX_INFORMATION_PAGE_5 . '</a>'; ?

></li>
<?php } ?> )


Create define_page_5.php in both of these folders

/includes/languages/english/html_includes ( added a define_page_5.php file )

/includes/languages/english/html_includes/your_template ( added a define_page_5.php file )

This should net you a generic page_5 in the "More Information" sidebox
You can then begin using this in your overrides areas

Once this works you can move on to custom titles etc - one at a time so you can track back if it breaks

As you can see, it still has the text that Kobra had inserted for instructions on how to clone a Page_2.

I am using V1.3.02 at the moment.

The page appears everywhere, except in Config Define Page Status.

I did do a search on my database to see if there was Page_5 info in there: what I actually did was click search then in the box I put Page_5, selected exact phrase then clicked go - nothing
I did the same for Page 5 & page 5, PAGE 5 & PAGE_5.
No results for any of those searches, but I don't really know if I was searching correctly.
If there is nothing in the database, why not?
I cloned & added text in every place I could find & would have thought that Zen Cart would have inserted the proper instructions in the database.
Can anyone help please?

Thanks in advance

Gay
http://www.artyfactsforcrafts.com:dontgetit
11 Jan 2008, 13:25
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Making Page_5 work

Download the about us module and follow the directions making note of each addition and edit then when you get this working you can apply the steps to any other page you want
11 Jan 2008, 13:42
#3
gayelston avatar

gayelston

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

Re: Making Page_5 work

kobra:

Download the about us module and follow the directions making note of each addition and edit then when you get this working you can apply the steps to any other page you want


I did download it, read through it & couldn't understand it.
When I read your post dated 2005 that included a step by step to cloning Page 2 I understood every word & decided to do it that way.
I was reminded by a friend that they had done the same for me when we first made a Zen Cart site, but that was a long time ago & I can't remember where his instructions were put because we have a new site now.
I have just posted a full explanation of everything I have done & was hoping that would help someone guide me.
I have everything working, except the text appearing in the opened window (though the title does) & the page appearing in Config Define Page Status.
Now I have it all written down, step by step,: I find this way long-winded but very followable so if we can just get this last bit sorted I will stick with it for the very few pages I need to add.
For my FAQ pages I think I'll go with EZpages, if I can learn how to add images - but that is the topic for another post - :D
Can you help me sort out this last bit please Kobra?
If it involves doing anything with the db I would need either step by step basic instructions, or pointing in the direction of where to find them
Thanks very much & sorry to be a pain.
I thought it ok to start a new thread with this topic becauase I have read loads of post from different people with the same problem.
Thanks again & regards
Gay
http://www.artyfactsforcrafts.com
11 Jan 2008, 13:54
#4
gayelston avatar

gayelston

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

Re: Making Page_5 work

kobra:

Download the about us module and follow the directions making note of each addition and edit then when you get this working you can apply the steps to any other page you want


Ok, I've read the "About_Us" readme again & it was this bit that threw me before:
Add the link to the About_us page into your sideboxes or other locations as desired.
The URL for it is either:
- zen_href_link(FILENAME_ABOUT_US)
or
- http://www.mysite.com/index.php?main_page=about_us
But now I look again it seems straightforward.
I might have a go, but I have 2 pages all ready to go if I can just do that last little bit, so the effort of doing 2 more this way & deleting the other 2 seems a bit wasted.
Of course, if no-one can help me sort it, then that's the way it will have to be I guess.
Thanks
Gay
http://www.artyfactsforcrafts.com
11 Jan 2008, 14:16
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Making Page_5 work

A quick check yeilds the following and I did not step through this to insure that this is complete:

/admin/includes/languages/english.php ( one line: define('BOX_TOOLS_DEFINE_PAGE_5','Page 5'

/admin/includes/languages/english/define_page_editor.php ( one line: define('TEXT_INFO_PAGE_5', 'Page 5')

/includes/modules/pages/page_2/header_php.php ( cloned folder, changed folder name & edited

/includes/filenames.php 2 places - define('FILENAME_DEFINE_PAGE_2', 'define_page_2'); & define('FILENAME_PAGE_2', 'page_2');

/includes/languages/english.php - define('BOX_INFORMATION_PAGE_2', 'Page 2');

/modules/sideboxes/more_information.php - 2 places
if (DEFINE_PAGE_2_STATUS <= 1) {
$more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' . BOX_INFORMATION_PAGE_2 . '</a>';

/templates/template_default/templates/tpl_page_2_default.php

/templates/template_default/templates/tpl_site_map_default.php
<?php if (DEFINE_PAGE_2_STATUS <= '1') { ?>
<li><?php echo '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' . BOX_INFORMATION_PAGE_2 . '</a>'; ?></li>

make the ones in template_default there and in your template override folder
11 Jan 2008, 14:43
#6
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: Making Page_5 work

WOW! Creating a new Define Page seems about as bad as installing a Mod in osCommerce. :wink:

Will have to take a look at the About Us mod because there must be an easier way to create a new, stand-alone page - hopefully.
11 Jan 2008, 14:47
#7
gayelston avatar

gayelston

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

Re: Making Page_5 work

[QUOTE=kobra;488179]A quick check yeilds the following and I did not step through this to insure that this is complete:


make the ones in template_default there and in your template override folder[/QUOTE

In /includes/templates/template_default/templates/tpl_page_2_default.php
I cloned the above, changed the title to read tpl_page_5_default.php & edited as follows:

<?php
/**
* tpl_page_5_default.php
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_page_5_default.php 3464 2006-04-19 00:07:26Z ajeh $
*/
?>
<div class="centerColumn" id="pageFive">
<h1 id="pageFiveHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if (DEFINE_PAGE_5_STATUS >= 1 and DEFINE_PAGE_5_STATUS <= 2) { ?>
<div id="pageFiveMainContent" class="content">
<?php
/**
* require the html_define for the page_5 page
*/
require($define_page);
?>
</div>
<?php } ?>
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
</div>

I haven't really got an overides folder because I'm using an virtually bog standard install, but a few bits inside some files was changed so I have an original folder & the current folder.
In that I did this:

/includes/languages/english/html_includes/your_template ( added a define_page_5.php file ) which was a cloned define_page_2.php that had been edited.

I have now changed all edited text back to read Page 5, instead of Directories as was the case on one or two of the pages, as when I changed Page 2 to read "Links"

Is that what you meant?
If not, could you be a bit more specific because I am bery easily confused :dontgetit:
Regards
Gay
http://www.artyfactsforcrafts.com
11 Jan 2008, 14:54
#8
gayelston avatar

gayelston

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

Re: Making Page_5 work

Is the /includes/templates/template_default/templates/tpl_page_2_default.php page the one that put Page 2 in the db?
Gay
http://www.artyfactsforcrafts.com
11 Jan 2008, 14:59
#9
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: Making Page_5 work

Define Pages are not inserted into the database.
That is why editting all the various files is required.

Basically, you are creating page 5 wherever you see a file for Page 2, 3 or 4 within the various directories.
11 Jan 2008, 15:10
#10
gayelston avatar

gayelston

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

Re: Making Page_5 work

Website Rob:

Define Pages are not inserted into the database.
That is why editting all the various files is required.

Basically, you are creating page 5 wherever you see a file for Page 2, 3 or 4 within the various directories.


That's what I did, by cloning a Page 2in ALL the various places
The new page shows everywhere EXCEPT the Config Define Page Status.
When I select the page from the sidebox, I can see the title on the main page, but none of the text that I entered using the Tools Define Page Editor.
I even have it on the sitemap.
Just need to know how to make the last bit work.
Regards
Gay
http://www.artyfactsforcrafts.com
11 Jan 2008, 16:10
#11
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Making Page_5 work

There is a super cool mod called Define Page Generator. Download it and you can create new page with any name within seconds.
11 Jan 2008, 19:45
#12
gayelston avatar

gayelston

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

Re: Making Page_5 work

yellow1912:

There is a super cool mod called Define Page Generator. Download it and you can create new page with any name within seconds.


Thanks for that.
I took a look, but it says I need MS.Net Framework 2.0
I know it might seem daft to youger minds, but there are only so many new things I can get my head around at any one time - & I feel like I'm on overload already!!
I might take a look if I get driven to desperation by not being able to sort it the cloning way or the "About Us" module, but I think this new thing will come in 3rd place.
I do appreciate the thought though & I'm sure lots of others will use it.
Also, it needs 1.3.7 & I only have 1.3.02 at the moment.
Thanks again
regards
Gay
http://www.artyfactsforcrafts.com
11 Jan 2008, 23:26
#13
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: Making Page_5 work

Although an upgrade to the newer version of Zen Cart is highly recommended, I agree with Gay on the .Net framework. Don't use it either and don't plan to in the near future. W2000 works just fine for me the way it is. My Laptop has Vista though so might give it try on that.

Gay, do you see an error msg. or success msg. after editting your page 5 in the Admin section?
12 Jan 2008, 00:04
#14
gayelston avatar

gayelston

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

Re: Making Page_5 work

Website Rob:

Although an upgrade to the newer version of Zen Cart is highly recommended, I agree with Gay on the .Net framework. Don't use it either and don't plan to in the near future. W2000 works just fine for me the way it is. My Laptop has Vista though so might give it try on that.

Gay, do you see an error msg. or success msg. after editting your page 5 in the Admin section?


Hi,
I don't get any sort of message, but then I don't when I edit 2, 3 or 4.
Should I?
regards
Gay
http://www.artyfactsforcrafts.com
12 Jan 2008, 00:07
#15
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Making Page_5 work

It usually take at least 10 - 15 mins to create a page for ZC, now it takes me 5secs. I wouldn't say I cant live without the mod, but it certainly makes my life easier.
Especially in my case, I build many cart sites for customers, and I have to create many custom pages for them, so the mod is a time saver.

Website Rob:

Although an upgrade to the newer version of Zen Cart is highly recommended, I agree with Gay on the .Net framework. Don't use it either and don't plan to in the near future. W2000 works just fine for me the way it is. My Laptop has Vista though so might give it try on that.

Gay, do you see an error msg. or success msg. after editting your page 5 in the Admin section?
12 Jan 2008, 00:51
#16
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: Making Page_5 work

If file permission are not 777 then the Admin Editor cannot write to the file and you will get an Error msg. There is no success msg. but thought I'd ask anyway.

Not really sure what the problem is but if you are not going to update, to v1.3.8a, then might be faster to use the "About Us" mod mentioned earlier or use an EZ page setup instead.
16 Jan 2008, 17:18
#17
fakesharksfinsoup avatar

fakesharksfinsoup

New Zenner

Join Date:
Jan 2008
Posts:
8
Plugin Contributions:
0

Re: Making Page_5 work

Hi Gayelston,

I face the exact same problem as you when following the instructions
1)Not showing up in define page status
2)not showing up when i click on the link in the more information box

Anyway, im using the latest version 1.3.8 so i dont think its the version problem.

Can anyone out there solve our problem? Please dont ask us to use EZpages or aboutus zip.....
16 Jan 2008, 18:55
#18
fakesharksfinsoup avatar

fakesharksfinsoup

New Zenner

Join Date:
Jan 2008
Posts:
8
Plugin Contributions:
0

Re: Making Page_5 work

Hi Gayelston,

I just solved my problem which is also yours. I hope you have not given up.

The below solves both issues i mentioned, definepage status and also appearing when i click on more information add page link.

1)Go to Admin-->Tools-->Install SQL patches

2)copy and paste the following SQL quote(change the 5 to whatever page number you want) :
insert into configuration (configuration_title, configuration_key,
configuration_value, configuration_description,
configuration_group_id,
sort_order, last_modified, date_added, use_function, set_function)
values
('Define Page 5', 'DEFINE_PAGE_5_STATUS', '1', 'Enable the Defined
Page 5
Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define
Text
ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text
OFF',
'25', '83', now(), now(), NULL, 'zen_cfg_select_option(array(\'0\',
\'1\',
\'2\', \'3\'),');


Hope you have a blessed time with your project!
16 Jan 2008, 18:59
#19
fakesharksfinsoup avatar

fakesharksfinsoup

New Zenner

Join Date:
Jan 2008
Posts:
8
Plugin Contributions:
0

Re: Making Page_5 work

OH YES! please backup all your files relating to zencart as running this query is 'nearly' impossible to reverse and it could mess your database big time.

And this solution was from a fellow Zenner. not mine....
16 Jan 2008, 19:43
#20
veronika7747 avatar

veronika7747

Zen Follower

Join Date:
Nov 2007
Posts:
270
Plugin Contributions:
0

Re: Making Page_5 work

gayelston:

That's what I did, by cloning a Page 2in ALL the various places
The new page shows everywhere EXCEPT the Config Define Page Status.
When I select the page from the sidebox, I can see the title on the main page, but none of the text that I entered using the Tools Define Page Editor.
I even have it on the sitemap.
Just need to know how to make the last bit work.
Regards
Gay
http://www.artyfactsforcrafts.com


Why don't you use define_page_generator from downloads? It worked really good for me!
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_47&products_id=804

Veronika