Page 1 of 2 12 LastLast
Results 1 to 10 of 25

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    18
    Plugin Contributions
    1

    Default Unable to make a text appear from the sidebox

    Hello,

    I have a small problem writing correrctly the code to add a new page in the sidebox Information. After, I figure out how it works, I do the following. (Note than I not really write the code, I copy it for the conditions page and modify it. That way, I had less chance to do a typo. Anyway, here is what I did:

    1) In catalogue/includes/filenames.php

    Add:
    define('FILENAME_ABOUT_US', 'about_us');
    define('FILENAME_DEFINE_ABOUT_US', 'define_about_us');

    2) In catalogue / includes / modules / pages /

    I create a folder about_us and a file header_php.php

    3) In catalogue/includes/modules/pages/about_us/header_php.php (My new created file)

    Write:

    <?php
    /**
    * About us Page
    *
    * @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'));

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

    $breadcrumb->add(NAVBAR_TITLE);
    ?>

    4) In catalogue/includes/modules/sideboxes/information.php

    Add:

    if (DEFINE_ABOUT_US_STATUS <= 1) {
    $information[] = '<a href="' . zen_href_link(FILENAME_ABOUT_US) . '">' . BOX_INFORMATION_ABOUT_US. '</a>';
    }


    5) In catalogue / includes / templates / template_default / templates /,
    I create a new file : tpl_about_us_default.php

    6) In this file, I wrote down:

    <?php
    /**

    * Page Template
    *
    * Loaded automatically by index.php?main_page=about_us.<br />
    * Displays conditions page.
    *
    * @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_conditions_default.php 3464 2006-04-19 00:07:26Z ajeh $
    */
    ?>
    <div class="centerColumn" id="about_us">
    <h1 id="conditionsHeading"><?php echo HEADING_TITLE; ?></h1>

    <?php if (DEFINE_ABOUT_US_STATUS >= 1) { ?>
    <div id="about_usMainContent" class="content">
    <?php
    /**
    * require the html_define for the about_us page See modules/pages/about_us/header_php.php
    */
    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>


    Now, I go on language section.


    7) In : catalogue/includes/languages/english.php, I write

    // information box text in sideboxes/information.php
    define('BOX_HEADING_INFORMATION', 'Informations');
    define('BOX_INFORMATION_ABOUT_US', 'The Company');


    8) In catalogue / includes / languages / english/, I add : about_us.php

    9) In catalogue / includes / languages / english/about_us.php

    I write :

    <?php
    /*
    about_us.php
    */
    define('NAVBAR_TITLE', 'FDMT');
    define('HEADING_TITLE', 'The Company');
    define('TEXT_INFORMATION', '
    ');
    ?>


    10) In catalogue / includes / languages / english / html_includes / I add : define_about_us.php


    11) in catalogue / includes / languages / english / html_includes / define_about_us.php
    I wrote :

    <P>My text in html form </P>

    **********
    Now, when I click on the link The company in the sidebox Informations, it opens an about_us page in which I have the NAVBAR_TiTLE and the HEADING_TITLE (not the constante but the variable) and the button Previous but I'm unable to see the texte in the define_about_us.php page.

    Is anybody able to tell me why ?


    Thanks in advance

  2. #2
    Join Date
    Jan 2004
    Posts
    18
    Plugin Contributions
    1

    Default Re: Unable to make a text appear from the sidebox

    Forget about that.

    I made a stupid mistake. It works now.


    Jean

  3. #3
    Join Date
    Jan 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: Unable to make a text appear from the sidebox

    Quote Originally Posted by jean View Post
    Forget about that.

    I made a stupid mistake. It works now.


    Jean
    Hi!
    I am trying to add pages to the sidebox, and followed your example.
    It was the best example that I know how to follow.
    Unfortunately I ran into the same problem you have that the texts do not show.
    How did you fix it? I couldn't figure it out myself.
    Please help!
    Thanks!

  4. #4
    Join Date
    Jan 2007
    Posts
    26
    Plugin Contributions
    0

    Default Re: Unable to make a text appear from the sidebox

    Yes Jean,

    Please provide us with your solution. I seem to be making the same mistake here.

    Thanks,

    Lex.

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Unable to make a text appear from the sidebox

    Jean posted the 4 areas that must be edited/added to in the initial post.

    Alternatively, your can download the aout us or blank bos modules and follow the instructions replacing your names with those in the mod
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Jan 2007
    Posts
    15
    Plugin Contributions
    0

    Default Re: Unable to make a text appear from the sidebox

    I followed the instructions in Jean's initial post (to add a Security Statement page), and I still have the problem she had initially--the Security Statement page appears, with the header, but the text does not appear on the page.

    Also, the Security Statement page will not appear in my sitemap.

    Q: Should the text in HTML includes be the same as the text that appears in the Define Pages Editor window for the security.php? Because mine is not.

    I also tried using the mod to add an About Us page, and that resulted in the same situation.

    Still stuck!!! Any thots? Thanks!

    --Michael

  7. #7
    Join Date
    May 2007
    Location
    york, pa
    Posts
    98
    Plugin Contributions
    0

    Default Re: Unable to make a text appear from the sidebox

    Hi need help
    get this error:

    Warning: main(includes/templates/template_default/templates/tpl_about_us_default.php) [function.main]: failed to open stream: No such file or directory in /home/4640/domains/blackfriday717.com/html/includes/templates/template_default/common/tpl_main_page.php on line 119

    Warning: main(includes/templates/template_default/templates/tpl_about_us_default.php) [function.main]: failed to open stream: No such file or directory in /home/4640/domains/blackfriday717.com/html/includes/templates/template_default/common/tpl_main_page.php on line 119

    Fatal error: main() [function.require]: Failed opening required 'includes/templates/template_default/templates/tpl_about_us_default.php' (include_path='.:/usr/local/php-4.4.7-1/share/pear') in /home/4640/domains/blackfriday717.com/html/includes/templates/template_default/common/tpl_main_page.php on line 119

    on the about us page

  8. #8
    Join Date
    Jun 2007
    Location
    Cymru
    Posts
    124
    Plugin Contributions
    0

    Default Re: Unable to make a text appear from the sidebox

    I've tried to follow the points at the top of this post to add two new pages to the 'More Information' Sidebox BUT I seem to be getting the same problem as many other people. The two pages have been created, the links appear in the 'More Information' Sidebox but no text appears on the pages!

    Here is what I did:

    1) In /includes/filenames.php

    I've added:
    define('FILENAME_PAGE_5', 'page_5');
    define('FILENAME_DEFINE_PAGE_5', 'define_page_5');

    2) In /includes/modules/pages/

    I created folder page_5 and a file header_php.php

    3) In /includes/modules/pages/page_5/header_php.php

    I have written

    <?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');
    ?>

    4) In /includes/modules/sideboxes/more_information.php

    I have added:

    if (DEFINE_PAGE_5_STATUS <= 1) {
    $more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_5) . '">' . BOX_INFORMATION_PAGE_5 . '</a>';
    }

    5) In includes/templates/template_default/templates/

    I created a new file called : tpl_page_5_default.php

    6) In this file, I put the following:

    <?php
    /**
    * Page Template
    *
    * @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>

    7) In /includes/languages/english.php, I've added

    // information box text in sideboxes/more_information.php - were TUTORIAL_
    define('BOX_INFORMATION_PAGE_5', 'Links');

    8) In /includes/languages/english/ I've added : page_5.php

    9) In /includes/languages/english/about_us.php

    I've again copied from the other (number) files, just replaced the other number with 5:

    <?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', 'Links');
    define('HEADING_TITLE', 'Links');

    define('TEXT_INFORMATION', 'Page 5 information goes here.');
    ?>

    10) In /includes/languages/english/html_includes/ I've added : define_page_5.php


    11) in /includes/languages/english/html_includes/define_page_5.php

    Is included the general text:

    <p><strong>Page 5 Sample Text ...</strong></p>
    <p>This section of text is from the Define Pages Editor located under Tools in the Admin.</p>
    <p>To remove this section of the text, delete it from the Define Pages Editor.</p>

    When I go to the page http://www.cadwyngifts.com/page_5.html it opens with everything showing correctly except that there's no text!

    Where have I gone wrong?!?!?!

  9. #9
    Join Date
    Jun 2007
    Location
    Cymru
    Posts
    124
    Plugin Contributions
    0

    Default Re: Unable to make a text appear from the sidebox

    I've now used the 'Developers Tool Kit' under Tools in stockroom, and looked for all references to page_2 and page_5 , and I can confirm that page_5 is a complete clone of page_2, therefore I cannot understand why the text appears fine on Page 2, but not the new Page 5 that I have created

    The only thing I haven't done is to add any sql statement to the database. Is this where I'm going wrong?

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Unable to make a text appear from the sidebox

    If you cloned page_2 identically then there is a define for:
    DEFINE_PAGE_2_STATUS

    that would now be called:
    DEFINE_PAGE_5_STATUS

    Where did you set the value of this define so it will show the define page for page_5?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. I Want to Make Products Appear from Newest to Oldest
    By keickholt13 in forum Customization from the Admin
    Replies: 3
    Last Post: 16 May 2011, 12:48 AM
  2. How Do I Make EZ-Pages Appear on Sidebox?
    By zcnb in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 15 Jul 2008, 03:29 PM
  3. How Do I Make the Link Text BOLD in My CATEGORIES Sidebox?
    By mtrantas in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Jan 2008, 03:34 AM
  4. How to Make Text Appear as BOLD
    By mtrantas in forum Basic Configuration
    Replies: 1
    Last Post: 26 Jan 2008, 04:30 PM
  5. How Do I Make the Text Appear as BOLD in My CATEGORIES Sidebox
    By mtrantas in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 26 Jan 2008, 05:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg