If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

osCommerce 2.3.1. How to create custom text page with link in footer and/or header menu

In this tutorial you will learn how to create custom text page with link in footer and header menu in OsCommerce 2.3.1

  1. Open “includes/modules/boxes/cm_menu_header.php” file.
  2. Scroll down and locate menu items. You can duplicate existing one, or simply use commented out item.
  3. Change file name for your new page. Lets name it NEW_PAGE
  4. Add new menu box, lets name it NEW_PAGE
  5. Add our button to existing items
  6. Open “includes/languages/english/modules/boxes/cm_menu_header.php file.
  7. Here, we should define our new menu item. Lets name it New Page
  8. You may refresh your site. You should be able to see new menu item already. Open includes/filenames.php file.
  9. Here, we should define our file name for a page. Lets name our custom page new_page.php.
  10. Now, we should create/add new_page.php in includes/languages/english/ directory. Define ‘HEAD_TITLE’ and ‘NAVBAR_TITLE’ in this file:
  11. <?php
    define('HEADING_TITLE', 'NewPage');
    define('NAVBAR_TITLE', 'NewPage');
    ?>
    
  12. Save it as new_page.php file in includes/languages/english/ folder.
  13. Now, we should create our new custom page in the root of OsCommerce engine:
  14. 
    <?php
    
      require('includes/application_top.php');
    
      require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEW_PAGE);
      $current_page = FILENAME_NEW_PAGE; 
    
      $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEW_PAGE));
    
      require(DIR_WS_INCLUDES . 'template_top.php');
    ?>
    <?php echo tep_draw_content_top();?>
    
    <?php echo tep_draw_title_top();?>
    <h1><?php echo HEADING_TITLE; ?></h1>
    <?php echo tep_draw_title_bottom();?>
    
    
    
    <p><strong>This is our new text here</strong></p>
    <p>Type in your page content here. Type in your page content here.</p>
    
    <?php echo tep_draw_content_bottom();?>
    
    <?php
      require(DIR_WS_INCLUDES . 'template_bottom.php');
      require(DIR_WS_INCLUDES . 'application_bottom.php');
    ?>
    
    
  15. Save it as ‘new_page.php’ (you may use another name, but it should be equal to the file name defined in includes/filenames.php file) in the root directory.
  16. Note, you can just duplicate (copy/paste) one of the existing pages like conditions.php

  17. Now, lets add new footer menu for our New Page as well.
  18. The process is basically the same. Open includes/modules/boxes/cm_menu_footer.php
  19. Duplicate existing item and specify Filename and Menu for Footer.
  20. Add new item to the list.
  21. Open includes/languages/english/modules/boxes/cm_menu_footer.php file.
  22. Define item for Footer Menu
  23. Save your changes. Refresh your site.

    Feel free to check the detailed video tutorial below:

    How to create custom text page with link in footer and/or header menu

    osCommerce 2.3.1. How to create custom text page with link in footer and/or header menu, 3.0 out of 5 based on 2 ratings