Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  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
    Jan 2007
    Posts
    2
    Plugin Contributions
    0

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

    I figured out the solution.
    Go to Jean's " [FONT=&quot]6) In this file, I wrote down. " The problem is here:

    [/FONT]
    [FONT=&quot]<?php if (DEFINE_ABOUT_US_STATUS >= 1) { ?>
    <div id="about_usMainContent" class="content">
    <?php

    [/FONT]I basically replace the content of this file ([FONT=&quot]tpl_about_us_default.php) with
    [/FONT][FONT=&quot]tpl_conditions.php. Don't change anything.
    You can replace it with any file that are the original files and you are sure you are going to keep, otherwise the trick may not work. The reason for that is in the " [/FONT][FONT=&quot]DEFINE_CONDITIONS_STATUS >= 1".[/FONT][FONT=&quot]
    I am not sure if my thinking is right because I am not familiar with PHP formate. But the solution did work. Good luck to you, too!
    [/FONT][FONT=&quot]
    [/FONT]

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

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

    Hello,

    I'm surprised to see all those posts about the problem I have experienced. In fact the solution was simple : A typo in section 6.

    <?php if (DEFINE_ABOUT_US_STATUS >= 1) { ?>
    <div id="about_usMainContent" class="content">
    <?php

    should read : <?php if (DEFINE_ABOUT_US >= 1) { ?>

    Anyway, as I was also interested to control that from the admin panel, I rewrite everything including sql statement, (it is not exact as I am used to code by modifying existing files. I want to give credit to those people who are real programmers) and submit it to the download section. If it didn't appear there, let me know here and I'll send it directyly to you as I don't know if the file upload or not. I have two statements differents on screen. Green one : file successly upload and red one, unable to upload.

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

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

    The reason for that is that the define pages utilizes a configuration_key to control the status of information ...

    The module appears to be missing the SQL statement for this configuration_key ...

    For your purposes, yes, you can use the code as changed ...

    But the better method would be to update to add-on to include the missing SQL statement ...

    Thanks for the update that worked for you ...
    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!

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

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

    Hello Linda,

    I agree with you. The first time I did it fast just to solve my problem then I studied the way you did it for the others links. It is why I posted for approbation the whole module including the sql statement which works exactly like the other links in the information box.

    But I don't know if you received it as the browser gave me two differents statements. Success and unsuccess.

 

 
Page 1 of 3 123 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