Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Add new page under "Information"

This is a discussion on Add new page under "Information" within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hi, I would like to add a size chart under the "Information" section. Can anyone help me with this. I ...

      
  1. #1
    New Member
    Join Date
    Feb 2005
    Posts
    20
    Rep Power
    0


    Default Add new page under "Information"

    Hi,

    I would like to add a size chart under the "Information" section. Can anyone help me with this. I tried placing it in like you would with the base install of OSC but it had errors coming up.

    Regards

  2. #2
    New Member
    Join Date
    Feb 2005
    Posts
    20
    Rep Power
    0


    Default

    This is the error I get:

    Warning: main(includes/header.php): failed to open stream: No such file or directory in /var/www/html/size_charts.php on line 29

    Fatal error: main(): Failed opening required 'includes/header.php' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/size_charts.php on line 29

  3. #3
    osCMax Developer

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


    Default

    Nope. Can't do it like regular osc. You should read the docs before attempting this. It makes things much easier.

    osCDox wiki pages
    Last edited by michael_s; 01-23-2007 at 07:17 AM. Reason: fixed link to oscdox wiki
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    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

  4. #4
    New Member
    Join Date
    Feb 2005
    Posts
    20
    Rep Power
    0


    Default

    Unfortunately the docs do not clearly state each step and seem to be missing something. Could someone please assist me in adding a new page to my information box.

    Thankyou

  5. #5
    New Member
    Join Date
    Feb 2005
    Posts
    20
    Rep Power
    0


    Default

    I now have Size Charts coming up under the information box. When I click on it it goes to size_chart.php however the content on the page is linking to PRIVACY. I think it has somthing to do with this part
    Code:
    $content_template = TEMPLATENAME_PRIVACY;
    under the main size_chart.php I created. If I change the "PRIVACY" to "SIZE_CHART" it brings up errors instead of the Size Chart content. The error I get is
    Code:
    Fatal error: main(): Failed opening required '' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/templates/aabox/main_page.tpl.php on line 116
    If anyone can help it would be greatly appreciated.

  6. #6
    osCMax Developer

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


    Default

    If you change PRIVACY to SIZE_CHART, you have to tell BTS what the value of TEMPLATENAME_SIZE_CHART is. Define this constant in includes/filenames.php Your new constant has no value until you define it.

    Doing a search across files in osCMax for TEMPLATENAME_PRIVACY would have told you exactly where to put your new constant. Ultra-Edit is a great text editor that allows searching across files. I suggest you get a tool for doing this (like Ultra Edit) and whenver you need to find something, just do a quick search for it across all the osCMax files. It takes seconds to do and you will learn a lot about where things go and how it is put together.

    See this too:
    http://oscdox.com/PNphpBB2-viewtopic-t-4842.html
    http://oscdox.com/modules.php?op=mod...sDocumentation
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    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

  7. #7
    New Member
    Join Date
    Feb 2005
    Posts
    20
    Rep Power
    0


    Default

    Thanks for your help but I have already defined all the lines that need to be defined in includes/filenames.php

    This is what I have: (I made a copy of the privacy parts and changed them)

    define('CONTENT_SIZE_CHART', 'size_chart');
    define('CONTENT_SIZE_CHART_CONTENT', 'size_chart');

    define('FILENAME_SIZE_CHART', CONTENT_SIZE_CHART . '.php');
    define('FILENAME_SIZE_CHART_CONTENT', CONTENT_SIZE_CHART_CONTENT . '.php');

  8. #8
    New Member
    Join Date
    Feb 2005
    Posts
    20
    Rep Power
    0


    Default

    sorry I forgot to mention after defining them I am still getting the same error message

  9. #9
    osCMax Developer

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


    Default

    You missed a step somewhere. Retrace your steps:

    1. Create the new file in the catalog dir - size_chart.php
    2. Create new file in /[templatename]/content dir - size_chart.tpl.php
    3. Add contstants that define the new filename and content:
    Code:
    define('CONTENT_SIZE_CHART', 'size_chart');
    define('FILENAME_SIZE_CHART', 'size_chart.php');

    4. Change the contents of size_chart.php to match your new contstants as per the instructions in the guide here :

    http://oscdox.com/phpWiki-index-page...mentation.html

    Code:
    <?php
    /*
      $Id: privacy.php,v 1.3.2.1 2005/06/12 00:03:43 Michael Sasek Exp $
    
      osCMax Power E-Commerce
      http://oscdox.com
    
      Copyright (c) 2003 osCommerce
    
      Released under the GNU General Public License
    */
    
      require('includes/application_top.php');
    
      require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SIZE_CHART);
    
      $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SIZE_CHART));
    
      $content = CONTENT_SIZE_CHART;
      $content_template = TEMPLATENAME_STATIC;
    
      include (bts_select('main', $content_template)); // BTSv1.5
    
      require(DIR_WS_INCLUDES . 'application_bottom.php');
    ?>
    5. Add a language file for your new page. Copy /includes/languages/english/privacy.php to /includes/languages/english/size_chart.php and edit the contents to look like this:

    Code:
    <?php
    /*
      $Id: privacy.php,v 1.1.1.1.2.1 2005/06/12 00:04:34 Michael Sasek Exp $
    
      osCMax Power E-Commerce
      http://oscdox.com
    
      Copyright (c) 2005 osCMax, 2002 osCommerce
    
      Released under the GNU General Public License
    */
    
    define('NAVBAR_TITLE', 'Size Chart');
    define('HEADING_TITLE', 'Size Chart');
    
    define('TEXT_INFORMATION', 'Put here your Size chart info here.');
    ?>
    6. Add a link to the information box by editing /includes/boxes/information.php. Copy the second to the last link defined and paste it in directly below the original. Change the constants to your filename constant and change the box constant text to whatever your text is. Alternately, you can add a box text constant to english.php and call the constant instead of adding custom text.


    Ok, so now I have done all the work for you. Please send payment to...
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    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

  10. #10
    New Member
    Join Date
    Feb 2005
    Posts
    20
    Rep Power
    0


    Default Thanks

    Thankyou for your help. It works now. I copied the piece of the code for the main size_chart.php you had and replaced mine with it. 10 hours later and it finally works!

    Thanks

Page 1 of 3 123 LastLast

Similar Threads

  1. Remove "QTPRO" for "Option Type Feature"
    By adam71o in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 01-10-2007, 10:32 AM
  2. Deleting "Gift Vouchers FAQ" from information box
    By motovelo in forum osCmax v2 Customization/Mods
    Replies: 5
    Last Post: 10-11-2006, 12:41 AM
  3. Catalog Front Page "Heading_Title" How To Change(?
    By bgharder in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 02-15-2005, 10:00 PM
  4. "Continue" button links to different page.Strange.
    By yellowriver in forum osCommerce 2.2 Modification Help
    Replies: 7
    Last Post: 11-03-2004, 12:49 PM
  5. Define main page error - "file not writeable"
    By mark754 in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 01-16-2004, 10:18 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
  •