Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to add some pages in Information slide-box

How to add some pages in Information slide-box

Locked

Views: 1,567

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
11 Oct 2007, 8:32 PM
#1
necro avatar

necro

New Zenner

Join Date:
Sep 2007
Posts:
16
Plugin Contributions:
0

How to add some pages in Information slide-box

Hi all,

Please tell me how can I add some pages in Information slide-box ???

ex:

  • Shipping & Returns
    • Privacy Notice
    • Conditions of Use
    • Contact Us
    • Site Map
    • Gift Certificate FAQ
    • Discount Coupons
    • Newsletter Unsubscribe
    • Shipping & Returns
    • Test page 1
    • Test page 2
    • Test page 3
      .......

You can see what I did :wacko:

At First

I going to page information.php in /includes/modules/sideboxes
At line:

  if (DEFINE_CONDITIONS_STATUS <= 1) {
    $information[] = '<a href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>';
  }

I copy and paste one edited below:

 
 if (DEFINE_TEST1_STATUS <= 1) {
    $information[] = '<a href="' . zen_href_link(FILENAME_TEST1) . '">' . BOX_INFORMATION_TEST1 . '</a>';
  }

save and upload it back.

**
Second step: **

In page english.php in /includes/languages
At line:

// information box text in sideboxes/information.php
  define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');

I copy and paste one edited below:

// information box text in sideboxes/information.php
  define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');
  define('BOX_INFORMATION_TEST1', 'Test page 1');

save and upload it back.

Third step:

I copy define_conditions.php and paste one with new name is define_test1.php in /includes/languages/english/html_includes


Fourth step:
I copy header_php.php in /includes/modules/pages/conditions and paste one at
/includes/modules/pages/test1

In this file, I has replaced:

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

after replaced:

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

Fift step:
I copy conditions.php and paste one with new name is test1.php in /includes/languages/english

At line:

define('NAVBAR_TITLE', 'Conditions of Use');
define('HEADING_TITLE', 'Conditions of Use');

define('TEXT_INFORMATION', 'Your Conditions of Use information should be on this page.');
?>

Replace to:

define('NAVBAR_TITLE', 'Test page 1');
define('HEADING_TITLE', 'Test page 1');

define('TEXT_INFORMATION', 'Your Test page 1 information should be on this page.');
?>

=====================================

Finally, I saw a new link Test page 1 in Information slide-box. But when I click this link, it's doesn't work.
Example: > http://DOMAIN.com/index.php?main_page=FILENAME_TEST1

:frusty::frusty::frusty:

What's wrong with me :no:

12 Oct 2007, 5:19 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to add some pages in Information slide-box

You made up this constant to use for the filename:
FILENAME_TEST1

Did you define that constant somewhere so that php knows what to translate it to? :unsure:

12 Oct 2007, 7:20 PM
#3
necro avatar

necro

New Zenner

Join Date:
Sep 2007
Posts:
16
Plugin Contributions:
0

Re: How to add some pages in Information slide-box

You made up this constant to use for the filename:
FILENAME_TEST1

Did you define that constant somewhere so that php knows what to translate it to?

Hi Ajeh,

I don't know how to do it... Please show what I need to make this page working ok?

Thanks for your reply,

Necro

13 Oct 2007, 3:32 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to add some pages in Information slide-box

Peek at ... but don't touch ... the file:
/includes/filenames.php

See how all the filenames have definitions?

Now, using the special directory:
/includes/extra_datafiles

add your own file such as:
mycustomfiles.php

and include the code:

<?php
define('FILENAME_TEST1', 'whateveryourfilenameishere');
?>

Now that will translate to your filename similar to page_2, page_3, etc.

13 Oct 2007, 5:37 PM
#5
necro avatar

necro

New Zenner

Join Date:
Sep 2007
Posts:
16
Plugin Contributions:
0

Re: How to add some pages in Information slide-box

Hello Ajeh,

Many thanks for your reply,

I didn't add /includes/extra_datafiles/mycustomfiles.php. I had try, and saw the result. <~~ I don't like this method because when I do it, my site got some errors.

I using define in /includes/filenames.php.
Added two line:

define('FILENAME_DEFINE_TEST1', 'define_test1');
define('FILENAME_TEST1', 'test1');

After that I click the link Test page 1 on Information slide-box,

http://DOMAIN.com/index.php?main_page=test1

Yeah, I see what I defined in support.php, NAVBAR_TITLE, HEADING_TITLE.

But I don't know why file define_support.php doesn't work. I just see the navbar title, head title, back button and nothing else.

Please try to help me one again...

Necro

13 Oct 2007, 7:48 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to add some pages in Information slide-box

The errors were cause by typos or space(s) or blank line(s) before the opening php tag <?php** or after the closing php tag **?> which will produce errors ...

You cannot see the define page due to:

1 all define pages must have a blank file in the:
/includes/languages/english/html_includes

or there is nothing to override ...

2 You have not defined the status for this page

Most likely you cloned an existing file and that has a status in it such as for page_2 you would see:

<?php if (DEFINE_PAGE_2_STATUS >= 1 and DEFINE_PAGE_2_STATUS <= 2) { ?>
<div id="pageTwoMainContent" class="content">
<?php
/**
 * load the html_define for the page_2 default
 */
  require($define_page);
?>
</div>
<?php } ?>

If there isn't a status in your file and you are using this define status, then the value is 0 and 0 means OFF ...