Categories

Featured templates

osCommerce. How to create custom page with a link in footer/header menu (in multilingual website)

Daniel Morales October 1, 2015
Rating: 5.0. From 3 votes.
Please wait...

This tutorial will show you how to create new page(s) in multilingual osCommerce site.

osCommerce. How to create custom page with link in footer/header menu (in multilingual website)
  1. Let’s take a Shipping page as a template for our new page. Open osCommerce installation directory and locate shipping.php file.

  2. Copy the file and rename it. For example, to newpage.php.

  3. Open this file and change:

      require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHIPPING);
      $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHIPPING));

    To:

      require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEWPAGE);
      $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEWPAGE));
  4. Make sure that this file includes the following:

    <?php echo TEXT_INFORMATION; ?> 

    TEXT_INFORMATION will include your page content defined in each language that you are using on your site:

    osCommerce_How_to_create_custom_page_with_link_in_footer_header_menu_1
  5. Open /includes folder and edit filenames.php file. Add new line and define new file name as follows:

    define('FILENAME_NEWPAGE', 'newpage.php');
    osCommerce_How_to_create_custom_page_with_link_in_footer_header_menu_2
  6. Open includes/languages/english directory. Locate shipping.php file, copy it and rename to newpage.php.

  7. Open newpage.php file and change its content:

      define('NAVBAR_TITLE', 'New Page');
      define('HEADING_TITLE', 'New Page');
      define('TEXT_INFORMATION', 'This will be our new page for English language.');
  8. Now we can add a new page and content for other languages that are available on your site.

  9. Open /includes/languages/your_language directory, for example /includes/languages/german.

  10. Locate shipping.php file, copy it and rename to newpage.php.

  11. Open newpage.php file and change its content:

      define('NAVBAR_TITLE', 'Neue Seite');
      define('HEADING_TITLE', 'Neue Seite');
      define('TEXT_INFORMATION', 'This will be our new page for German language');
    osCommerce_How_to_create_custom_page_with_link_in_footer_header_menu_3
  12. Now, let’s add new footer menu for our New Page as well.

  13. The process is basically the same. Open includes/modules/boxes/cm_menu_footer.php:

    osCommerce_How_to_create_custom_page_with_link_in_footer_header_menu_4
  14. Duplicate existing item and specify Filename and Menu for Footer:

    osCommerce_How_to_create_custom_page_with_link_in_footer_header_menu_5
  15. Add a new item to the list.

  16. Open includes/languages/english/modules/boxes/cm_menu_footer.php file:

    osCommerce_How_to_create_custom_page_with_link_in_footer_header_menu_7
  17. Define item for Footer Menu:

    osCommerce_How_to_create_custom_page_with_link_in_footer_header_menu_8

Save your changes. Refresh your site.

Feel free to check the detailed video tutorial below:

osCommerce. How to create custom page with link in footer/header menu (in multilingual website)
This entry was posted in OsCommerce Tutorials and tagged custom, header, link, menu, multilingual, osCommerce, page. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket

Live Chat
We help you to choose the right product.