Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / How to add a new page in the footer, that shows up in de define page editor?

How to add a new page in the footer, that shows up in de define page editor?

7 Apr 2015, 11:40 PM
#1
pompidompie avatar

pompidompie

Zen Follower

Join Date:
Mar 2015
Posts:
105
Plugin Contributions:
0

Post #1 by pompidompie

How to add a new page in the footer, that shows up in de define page editor?
To make more links into the footer, like shipping & returns, i am trying to add some pages.

I used shippinginfo and copied all te files.
Includes/modules/pages/shippinginfo and its header.
Includes/languages/english/shippinginfo.php
Includes/languages/english/html_includes/define_shippinginfo.php
Includes/languages/english/html_includes/classic/define_shippinginfo.php
Includes/templates/template_default/templates/tpl_shippinginfo_default

Now i have the page I added showing up in the define page editor in the admin.
I can add text there, but as i save and look on the catalog side, it (the words) does not show up. The only thing I see is the title navbar & heading.
So I must have forgotten something, but i have to little experience to know what else i need to ajust.

Language: Dutch
English: not so very good
Allready have a live shop, so building local/on my computer

8 Apr 2015, 8:25 AM
#2
pompidompie avatar

pompidompie

Zen Follower

Join Date:
Mar 2015
Posts:
105
Plugin Contributions:
0

Post #2 by pompidompie

For anyone who likes to know what I have done to make it work:

(I did not changes the staps in the above post)

/includes/filenames.php
Add
define('FILENAME_DEFINE_YOURPAGE', 'define_yourpage');
define('FILENAME_YOURPAGE', 'yourpage');

/includes/languages/custom_template/english.php
Add
define('BOX_INFORMATION_YOURPAGE', 'YourPage');

/includes/languages/english.php.
Add
define('BOX_INFORMATION_YOURPAGE', 'YourPage');

Copy
/includes/languages/english/shippinginfo.php
Paste and change to
/includes/languages/english/yourpage.php
Modify shippinginfo.php, navbar, heading and text to whatever you want it to be

copy
/includes/modules/pages/shippinginfo
paste and changes
/includes/modules/pages/yourpage
Also change the header in there
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_YOURPAGE, 'false');

/includes/modules/sideboxes/information.php
Add
if (DEFINE_YOURPAGE_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_YOURPAGE) . '">' . BOX_INFORMATION_YOURPAGE . '</a>';
}

Copy
/includes/templates/templates_default/templates/tpl_shippinginfo_default.php
Paste and change into
/includes/templates/templates_default/templates/tpl_yourpage_default.php
rename and add
tpl_yourpage_default.php, <?php if (DEFINE_YOURPAGE_STATUS >= 1 and DEFINE_YOURPAGE_STATUS <= 2) { ?>, * require the html_define for the yourpage page

/includes/templates/templates_default/templates/tpl_site_map_default.php
Add

<?php if (DEFINE_YOURPAGE <= '1') { ?> <li><?php echo '<a href="' . zen_href_link(FILENAME_YOURPAGE) . '">' . BOX_INFORMATION_YOURPAGE . '</a>'; ?></li> <?php } ?>

/admin/includes/languages/english.php
Add
define('TEXT_INFO_RETURNS', 'YourPage');

Copy
/includes/languages/english/html_includes/define_shippinginfo.php
paste
/includes/languages/english/html_includes/define_yourpage.php

go to instal sql in the admin and add
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 yourpage', 'DEFINE_YOURPAGE_STATUS', '1', 'Enable the Defined yourpage 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= LinkOFF, Define Text OFF', 25, 100, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
If it does not work, add by hand

In the admin, under configuration, define page status, you hould now find your new page, set to 1.

I hope i didn't forget anything :blush:
For me it worked, i can now add text to the pages and see it on the catalog side.

Language: Dutch
English: not so very good
Allready have a live shop, so building local/on my computer