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

How to add new pages in mod to BTS

This is a discussion on How to add new pages in mod to BTS within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I am desperately trying to get the xml tracking module to install, but I am stuck with a couple of ...

      
  1. #1
    Active Member
    Join Date
    Dec 2003
    Posts
    112
    Rep Power
    9


    Default How to add new pages in mod to BTS

    I am desperately trying to get the xml tracking module to install, but I am stuck with a couple of files that I am supposed to add to the catalog directory, but I am not sure how to convert them to work with BTS. I am not a programmer, but I have been able to figure out most of mods I have tried in the past. I only need to change the following files over;

    catalog/popup_tracker.php
    catalog/tracking.php

    and make a few changes to styleshee.css which I think I can just add these entries into the catalog/templates/fallback/stylesheet.css????

    I have opened a few of the catalog/ files and compaired them to their fallback/content/ counterpart but I dont understand enough to change them and make the templates files for them, can anyone help me with this, I have a feeling it is very simple and would only take someone that know about 2 minutes.
    thanks Doug

  2. #2
    Active Member
    Join Date
    Dec 2003
    Posts
    112
    Rep Power
    9


    Default RE: How to add new pages in mod to BTS

    Here is the code for the files, maybe somone can tell me what needs moved to the new .tpl.php files I will ahve to make for them,

    tracking.php
    Code:
    <?php
    /*
      $Id: shipping.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2003 osCommerce
    
      Released under the GNU General Public License
    */
    
      require('includes/application_top.php');
    
      require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_TRACKING);
    
      $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_TRACKING));
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    </head>
    <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->
    
    <!-- body //-->
    <table border="0" width="100%" cellspacing="3" cellpadding="3">
      <tr>
        <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <!-- left_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
    <!-- left_navigation_eof //-->
        </table></td>
    <!-- body_text //-->
        <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
                <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'ups_logo.gif'); ?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
          </tr>
          <tr>
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><?php echo TEXT_INFORMATION; ?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
          </tr>
          <tr>
            <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
              <tr class="infoBoxContents">
                <td>
                <form method="post" action="<?php echo $PHP_SELF; ?>">
                <input type="hidden" name="action" value="track">
                <table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td align="center" width="100%"><input type="text" name="tracknum" value="<?php echo $tracknum; ?>" maxlength="20" size="20"> <input type="submit" name="button" value="Track!"></td>
                  </tr>
                  <tr>
                  	<td><?php include(DIR_WS_CLASSES . FILENAME_TRACKING); ?></td>
                  </tr>
                </table>
                </form></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
    <!-- body_text_eof //-->
        <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <!-- right_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
    <!-- right_navigation_eof //-->
        </table></td>
      </tr>
    </table>
    <!-- body_eof //-->
    
    <!-- footer //-->
    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    <!-- footer_eof //-->
    <br>
    </body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
    popup_tracker.php
    Code:
    <?php
    /*
      $Id: popup_tracker.php,v 1.0 200/05/18 12:18:40 $
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2002 osCommerce
    
      Released under the GNU General Public License
    */
    
      require('includes/application_top.php');
    
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <title>UPS Tracking</title>
    <base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    <script language="javascript"><!--
    var i=0;
    function resize() {
      if (navigator.appName == 'Netscape') i=40;
    }
    //--></script>
    </head>
    <body>
    <center>
    <table border="0" width="625" cellpadding="3" cellspacing="0">
    	<tr>
    		<td align="left" width="100%" class="main">
    <?php require(DIR_WS_CLASSES . 'tracking.php'); ?>
    		</td>
    	</tr>
    </table>
    </center>
    </body>
    </html>
    Stylesheet.css (one that came with mod)
    [code]
    .UPSheader {
    font-size: 13pt;
    color: #663300;
    font-weight: 900;
    }

    .UPSheader2 {
    font-size: 8pt;
    font-weight: bold;
    color: #ffffff;
    }

    .appheadercolor {
    background-color: #996633;
    }

    .modulepad {
    padding-left:10px;
    padding-right:10px;
    }

    .spacing {
    padding-left: 10px;
    padding-right: 10px;
    }

    .modpadbullet {
    padding-left:6px;
    text-indent: -9px;
    padding-right:5px;
    }

    TD.ups {
    font-family: verdana, arial,sans-serif;
    font-size: 7pt;
    }

    TD.upsSmall {
    font-family: verdana, arial,sans-serif;
    font-size: 6pt;
    }

    .brownbold {
    color: #663300;
    font-weight: bold;
    }

    Any help would greatly be appreciated.
    Thanks
    Doug

  3. #3
    Active Member
    Join Date
    Dec 2003
    Posts
    112
    Rep Power
    9


    Default RE: How to add new pages in mod to BTS

    Ok, I have edited the tracking.php into two files, one tracking.php and the other tracking.tpl.php hopefully sucessfully, here are the new code

    tracking.tpl.php
    Code:
              <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <!-- right_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
    <!-- right_navigation_eof //-->
        </table></td>
      </tr>
    </table>
    tracking.php
    Code:
    <?php
    /*
      $Id: shipping.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2003 osCommerce
    
      Released under the GNU General Public License
    */
    
      require('includes/application_top.php');
    
      require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_TRACKING);
    
              $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_TRACKING));
    
              $content = CONTENT_TRACKING;
      
      
    
      include (bts_select('main', $content_template)); // BTSv1.5
      
     require(DIR_WS_INCLUDES . 'application_bottom.php'); 
     ?>

    But now I am trying to do the same to popup_tracker.php, but it is not so easy to see what needs to be moved on this one,, my guess is maybe just the ;
    Code:
    <script language="javascript"><!--
    var i=0;
    function resize() {
      if (navigator.appName == 'Netscape') i=40;
    }
    //--></script>
    which would make the popup_tracker.php file only have;
    Code:
    <?php
    /*
      $Id: popup_tracker.php,v 1.0 200/05/18 12:18:40 $
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2002 osCommerce
    
      Released under the GNU General Public License
    */
    
      require('includes/application_top.php');
           $content = CONTENT_POPUP_TRACKER;
     
    
      include (bts_select('main', $content_template)); // BTSv1.5
    ?>
    Would that be right, and I need to know if I can just add the info from the mods stylesheet.css to the one in the templates/aabox/stylesheet.css at the end and save it???
    Please I am stumbling in the dark, any help would be great...
    Doug

  4. #4
    New Member
    Join Date
    Mar 2004
    Posts
    11
    Rep Power
    0


    Default

    Hi Doug

    Your pretty much there, use this guide found at this location

    http://www.oscdox.com/index.php?name...amp;highlight=

    You basically have to split tracking.php into 2 files

    catalog\tracking.php and catalog\templates\fallback\content\tracking.tpl.ph p

    The link will explain what each file should contain. Hope that helps

  5. #5
    Active Member
    Join Date
    Dec 2003
    Posts
    112
    Rep Power
    9


    Default

    I have figured it out, and it is now working as far as pulling the right page, but I am now on to fix why it isnt tracking packages.

    Seems nothing is happening when I run a tracking number, so must be the includes/classes/tracking.php
    thanks

Similar Threads

  1. Extra Pages
    By pefc2525 in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 01-09-2006, 07:14 PM
  2. ssl pages not working
    By Redeye_Joe in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 06-23-2005, 05:42 PM
  3. extra pages mod - doesnt resemble main pages
    By battleaxe in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 11-05-2004, 05:32 AM
  4. Dual Log-in Pages
    By SleepingEye in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 10-07-2004, 06:53 AM
  5. HOW TO ADD MORE PAGES!?
    By calle in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 09-22-2004, 02:47 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
  •