Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Jun 2006
    Posts
    86
    Plugin Contributions
    0

    Default How can I include a page in a sidebox?

    I added a file to templates/sideboxes and want it to call a page but I can't figure the include call. This is what I have
    Code:
    <?php
    /**
     * tpl_specials.php
     *
     * @package templateSystem
     * @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: tpl_specials.php 2982 2006-02-07 07:56:41Z birdbrain $
     */
      $content = "";
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
      $content .= '<?include ('/languages/english/html_includes/define_ccdetails.php') ?>'; 
      $content .= '</div>';
    ?>
    Can someone please help me figure the correct method to call this page. Thanks

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: How can I include a page?

    Well - for one thing you can't nest the <?php> tags.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Jun 2006
    Posts
    86
    Plugin Contributions
    0

    Default Re: How can I include a page?

    Ok.. so what is the correct method of including a page

  4. #4
    Join Date
    Jun 2006
    Posts
    86
    Plugin Contributions
    0

    Default Re: How can I include a page?

    Any suggestions on this??

  5. #5
    Join Date
    Jun 2006
    Posts
    86
    Plugin Contributions
    0

    Default Re: How can I include a page?

    Still searching for the method.... anyone?

  6. #6
    Join Date
    Jun 2006
    Posts
    86
    Plugin Contributions
    0

    Default Re: How can I include a page?

    Is it that this is not possible? Just a little help... please

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

    Default Re: How can I include a page?

    You mean add an include like all of the tpl_page_X_default.php and tpl_contact_us_default.php and tpl_shippinginfo_default.php

    If so, you might peek at those files and see how the requires work ...

    The $define_page is set in the header_php.php of each of those pages, example:
    /includes/pages/shippinginfo

    PHP Code:
    $define_page zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] . '/html_includes/'FILENAME_DEFINE_SHIPPINGINFO'false'); 
    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!

  8. #8
    Join Date
    Jun 2006
    Posts
    86
    Plugin Contributions
    0

    Default Re: How can I include a page?

    Well I really don't know what all that does or how to apply it. All I want is to make a page with content display within a sidebox I created.

    I created in includes/templates/template_default/tpl_textbox.php and it looks like this
    Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @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: tpl_search.php 4142 2006-08-15 04:32:54Z drbyte $
     */
      $content = "";
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
      $content .= I WANT TO INCLUDE A PAGE HERE what code does this
      $content .= '</div>';
    ?>
    Then I created a corresponding file in includes/modules/sideboxes/textbox.php to make it appear in the layout boxes list in the admin area.
    Code:
    <?php
    /**
     * search sidebox - displays keyword-search field for customer to initiate a search
     *
     * @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: search.php 2834 2006-01-11 22:16:37Z birdbrain $
     */
    
      require($template->get_template_dir('tpl_textbox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_textbox.php');
    
      $title = '<label>' . BOX_HEADING_TEXTBOX . '</label>';
      $title_link = false;
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    ?>
    I also created a file in includes/languages/english/html_includes/define_textbox.php which I can write to from the define pages editor in the admin. I want this page (define_textbox.php) to be called into the side box. How can this be done.

  9. #9
    Join Date
    Jun 2006
    Posts
    86
    Plugin Contributions
    0

    Default Re: How can I include a page?

    I've spent so many hours on this and can't get any success. Can someone please tell me how to create an html_includes/define_page.php that I can edit with the define pages editor and make it display in the sideboxes?

    All went well with creating the side box and able to display it on the page but I need to get the content in it.

  10. #10
    Join Date
    Dec 2006
    Posts
    6
    Plugin Contributions
    0

    Default Re: How can I include a page?

    I have the same problem of yours. I can add pages to sideboxes, for eg: add page_7.html to "more information " sideboxes, the page_7.html created and can be edited from admin->tools->define page editor, but the new page_7.html is empty!
    help!!!!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Categories Sidebox: How to always include subcategories?
    By lat9 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Mar 2010, 02:18 PM
  2. How can I include a php file in the header section?
    By Andy_R in forum General Questions
    Replies: 3
    Last Post: 11 Sep 2009, 05:50 PM
  3. How can sub-total include shipping??
    By Kitiarachan in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 4
    Last Post: 6 Nov 2007, 03:48 PM
  4. Can I include a defined page in another?
    By CheekyCockney in forum General Questions
    Replies: 3
    Last Post: 20 May 2006, 03:36 PM

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