osCmax v2.5 User Manual
Results 1 to 5 of 5

Why is adding pages so hard??

This is a discussion on Why is adding pages so hard?? within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I have been following the instrucitons here: adding_new_dynamic_content_pages [osCMax and osCommerce documentation] It is extrmely difficult if something doesn't work. ...

      
  1. #1
    Member
    Join Date
    Oct 2008
    Posts
    31
    Rep Power
    0


    Default Why is adding pages so hard??

    I have been following the instrucitons here: adding_new_dynamic_content_pages [osCMax and osCommerce documentation]

    It is extrmely difficult if something doesn't work. I have been going over the steps twice now and still can't figure out why my page doesn't work. All I get is TEXT_FILE_DOES_NOT_EXIST in the admin.

    I can't find where I messed up. Why is this so hard? Why is there not a simple tool to ad pages?

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Why is adding pages so hard??

    You possably missing a few files - like first of all in admin/define/languages/(english)/define_(name of new page).php

    Second of all your missing a blank file of the file you want to display.
    ie: Possibly...
    1.6 - Copy includes/languages/english/shipping_content.php and rename to about_content.php



    Please check the instructions....


    As for not being easy. Since this is base on osCommerce - it just has hard (possably harder) to add this into it.

    There is a contribution that you can dynamically ADD in pages - this will be in the NEXT future version of oscmax - but not the current that is in beta now - that version is an update for current mods and bugs (very little added features).
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  3. #3
    New Member
    Join Date
    Sep 2008
    Posts
    14
    Rep Power
    0


    Default Re: Why is adding pages so hard??

    i found myself doing this quite a lot using this guide using OscMax V2.0

    For this example I am going to create about.php

    as long as you follow it, IT DOES WORK EVERYTIME!



    1.0 - Creating the pages for the front end

    1.1 - Copy shipping.php and rename to about.php

    1.2 - about.php
    Change all references of _SHIPPING to _ABOUT

    1.3 - /includes/filenames.php
    Add the following definitions:
    define('CONTENT_ABOUT', 'about');
    define('CONTENT_ABOUT_CONTENT', 'about_content');
    define('FILENAME_ABOUT', CONTENT_ABOUT . '.php');
    define('FILENAME_ABOUT_CONTENT', CONTENT_ABOUT_CONTENT . '.php');

    1.4 - Copy includes/languages/english/shipping.php and rename to about.php

    1.5 - includes/languages/english/about.php
    Change relevant information

    1.6 - Copy includes/languages/english/shipping_content.php and rename to about_content.php

    1.7 - Copy templates/[templatename]/content/shipping.tpl.php and rename to about.tpl.php (may need to copy first from fallback template)

    1.8 - templates/[templatename]/content/about.tpl.php
    Change:
    <?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHIPPING_CONTENT); ?>
    to
    <?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ABOUT_CONTENT); ?>

    1.9 - includes/configure_bts.php
    Add the following definition:
    define('TEMPLATENAME_ABOUT', 'about.tpl.php');

    2.0 - Link to the page: <a href=”<?php echo tep_href_link(FILENAME_ABOUT) ?>”>ABOUT US</a>

    3.0 - Creating the pages in admin section

    3.1 - /admin/index.php
    Find:
    array('title' ⇒ BOX_CATALOG_DEFINE_SHIPPING, 'link' ⇒ tep_href_link(FILENAME_DEFINE_SHIPPING, 'selected_box=catalog')),
    And duplicate it for each page you want to add, modifying SHIPPING to ABOUT

    3.2 - /admin/includes/boxes/catalog.php
    Find:
    tep_admin_files_boxes(FILENAME_DEFINE_SHIPPING, BOX_CATALOG_DEFINE_SHIPPING) .
    And duplicate it for each page you want to add, modifying SHIPPING to ABOUT

    3.3 - Copy admin/define_shipping.php and rename to define_about.php
    Change all references of SHIPPING to ABOUT

    3.4 - admin/includes/languages/english.php
    Add the following definition:
    define('BOX_CATALOG_DEFINE_ABOUT', 'About Page');

    3.5 - admin/includes/filenames.php
    Add the following definition:
    define('FILENAME_DEFINE_ABOUT','define_about.php') ;

    3.6 - add access to define_about.php in the administrator menu: in back office admin, goto administrator -> file access -> catalog -> click on store files -> click drop down and find the new page - > save and should now appear in the side menu

    3.7 - make sure the page is writeable, the page will be about_content.php in includes/languages/english
    Last edited by bluhalo; 11-11-2008 at 08:33 AM.

  4. #4
    New Member
    Join Date
    Dec 2008
    Posts
    7
    Rep Power
    0


    Default Re: Why is adding pages so hard??

    This is the formal and impractical way. Assuming the page you want to add is "about.php" The minimal code to add new pages to oscmax is:

    1) Create a page called "about.php" in your catalog directory.

    2) Put these lines into this file (be careful about the extra space before the php opening tag otherwise you'll get nasty session warnings):

    <?php

    include('includes/application_top.php');

    define('NAVBAR_TITLE', 'bla bla'); // optional
    define('NAVBAR_TITLE_1', 'bla bla'); // optional

    $content = 'about';
    include (bts_select('main'));
    ?>

    3) create & put everything you want in a file called "about.tpl.php" under your template directory.

    DONE!

    now point to http://www.blabla.com/about.php

    easy eh?

  5. #5
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Why is adding pages so hard??

    Or just use the articles manager to create a new article, then add a link to it wherever you want...even easier.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

Similar Threads

  1. Adding New Pages
    By kerryanne in forum osCmax v2 Customization/Mods
    Replies: 5
    Last Post: 10-27-2008, 01:59 PM
  2. Adding new pages into cart
    By deviantla in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 04-19-2007, 09:29 AM
  3. Adding New Pages - About Us
    By Cisco in forum osCMax v2 Features Discussion
    Replies: 1
    Last Post: 06-26-2006, 06:24 AM
  4. adding new pages
    By Dumb_Question in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 01-30-2004, 12:11 PM
  5. Help adding admin pages
    By mutebot in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 07-08-2003, 08:05 AM

Bookmarks

Posting Permissions

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