Jump to content

heliosquare

Members
  • Content count

    200
  • Joined

  • Last visited

1 Follower

About heliosquare

  • Birthday 04/14/1976

Profile Information

  1. heliosquare

    [Contribution] UPS XML Tracking

    did you get this working properly yet? I can't say I have an answer to your issue but you may want to try escaping the single-quotes in the javascript... <a href="javascript:popupTrackerWindow(\'popup_tracker.php?action=track&tracknum=<?php echo $order->info['ups_track_num']; ?>\')"> The above is more of a syntax fix and not escaping the quotes wouldn't necessarily cause the behavior you described...worth a shot though. Stranger things have happened...
  2. heliosquare

    [Contribution] UPS XML Tracking

    You sure you are on the right thread? I have no idea what you are talking about...
  3. heliosquare

    [Contribution] UPS XML Tracking

    I'm assuming you are using MS Access and the mysql-odbc driver to connect to the msyql database? Getting Access to update a mysql table is impossible I think. I developed an online bill-pay section for my company that uses Access to pull the data from our accounting software and then export it to mysql via the odbc driver. During the export I have to delete the table being updated and then repopulate it with new data. I don't think an actual update is possible. I would suggest that you export from WorldShip to a .csv file and then update the orders table with it. It would require a very simple script to do so. The only way I can think of to associate the right order/tracking number pair is to use the osc-generated order number as your reference number in worldship. Then you could export just those 2 fields to a .csv file...
  4. heliosquare

    [Contribution] UPS XML Tracking

    Hmmm, we use worldship too but I haven't tried this. What was your method when you tried?
  5. heliosquare

    [Contribution] UPS XML Tracking

    well my first guess would be that you messed something up during the editing. The edits to account_history.php and account_history_info.php are quite minimal and neither require changing any code...they just require you add code. Double-check your code...post some here if need be...
  6. heliosquare

    [Contribution] Ultimate SEO URLs v2.0

    If you have osc version 2.2-MS1 and are having problems installing this contrib. then just follow these directions. A few minor changes need to be made to get it working. /includes/application_top.php *************************** after the line: require(DIR_WS_LANGUAGES . $language . '.php'); paste the following: # include the cache class include('includes/classes/cache.class.php'); $cache = new cache($languages_id); // define our general functions used application-wide require(DIR_WS_FUNCTIONS . 'general.php'); require(DIR_WS_FUNCTIONS . 'html_output.php'); # include the Ultimate SEO URLs cache file include('includes/seo_cache.php'); # Get the cache - no parameters will get all GLOBAL cache entries for this language $cache->get_cache('GLOBAL'); The order of included/required files is important b/c the cache class must be called before general.php and html_output.php, and general.php must be called before seo_cache.php /includes/functions/html_output.php ******************************** copy-n-paste the new tep_href_link() function as per the instructions in the install.html fle but then make the following changes: find the following lines: if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; $seo_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; $seo_rewrite_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; $seo_link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; $seo_rewrite_link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; $seo_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; $seo_rewrite_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } and replace with these lines: if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_CATALOG; $seo_link = HTTP_SERVER . DIR_WS_CATALOG; $seo_rewrite_link = HTTP_SERVER . DIR_WS_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_CATALOG; $seo_link = HTTPS_SERVER . DIR_WS_CATALOG; $seo_rewrite_link = HTTPS_SERVER . DIR_WS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_CATALOG; $seo_link = HTTP_SERVER . DIR_WS_CATALOG; $seo_rewrite_link = HTTP_SERVER . DIR_WS_CATALOG; } osc 2.2 MS1 does not use DIR_WS_HTTP_CATALOG or DIR_WS_HTTPS_CATALOG The code above fixes this issue includes/functions/general.php ***************************** add the following function to this file: function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { return htmlspecialchars($string); } else { if ($translate == false) { return tep_parse_input_field_data($string, array('"' => '"')); } else { return tep_parse_input_field_data($string, $translate); } } } The changes noted above worked for me...
  7. heliosquare

    OSC Active Desktop

    just change the function like this: function formatPurchaseDate($var) { $date = substr($var, 0, 10); $time = substr($var, -8, 8); $new_date = substr($date, -2, 2) . '.' . substr($date, -5, 2) . '.' . substr($date, 0, 4); $time_left = substr($time, 0, 2); $time_right = substr($time, -5, 2); if (substr($time_left, -2, 1) == 0) { $time_left = substr_replace($time_left, ' ', -2, 1); } if ($time_left == 12) { $sign = "PM"; } elseif ($time_left > 12) { $time_left -= 12; $sign = "PM"; } else { $sign = "AM"; } $new_time = $time_left . ':' . $time_right . ' ' . $sign; $date_time = $new_date . ' ' . $new_time; return $date_time; }
  8. heliosquare

    OSC Active Desktop

    gregy, you certainly have a lot of contribs. installed....do you have a url I can see to check them out?
  9. heliosquare

    OSC Active Desktop

    not sure what you are asking...the function isn't in osc_active_desktop.php because you have to add it there first <?php echo $command['date_purchased']; ?> is found at around line 180 and <?php echo $command2['date_purchased']; ?> is found at around line 257 paste the function at the top of the page at around line 19 and then change <?php echo $command['date_purchased']; ?> to <?php echo formatPurchaseDate($command['date_purchased']); ?> and chanage <?php echo $command2['date_purchased']; ?> to <?php echo formatPurchaseDate($command2['date_purchased']); ?>
  10. heliosquare

    OSC Active Desktop

    If you are like me then you hate looking at dates that aren't formatted like dd/mm/yyyy and times that are in military format. If, in fact, you are like me then add this function at around line 19 in osc_active_desktop.php: function formatPurchaseDate($var) { $date = substr($var, 0, 10); $time = substr($var, -8, 8); $new_date = substr($date, -5, 2) . '/' . substr($date, -2, 2) . '/' . substr($date, 0, 4); $time_left = substr($time, 0, 2); $time_right = substr($time, -5, 2); if (substr($time_left, -2, 1) == 0) { $time_left = substr_replace($time_left, ' ', -2, 1); } if ($time_left == 12) { $sign = "PM"; } elseif ($time_left > 12) { $time_left -= 12; $sign = "PM"; } else { $sign = "AM"; } $new_time = $time_left . ':' . $time_right . ' ' . $sign; $date_time = $new_date . ' ' . $new_time; return $date_time; } And then find <?php echo $command['date_purchased']; ?> and replace with <?php echo formatPurchaseDate($command['date_purchased']); ?> The above occurs twice - one for pending orders and one for processing orders.
  11. heliosquare

    [Contribution] UPS XML Tracking

    just add them to the very top of the file and the very bottom of the file respectively... <?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 */ ?ob_start(); ?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('includes/classes/tracking.php'); ?> ?</td> </tr> </table> </center> </body> </html> <?php ob_end_flush(); ?>
  12. heliosquare

    [Contribution] UPS XML Tracking

    just to clarify, the ob_start() function has nothing to do with gzip. Any output destined for the screen that is generated by code in between ob_start() and ob_end_flush() will be buffered so that further processing can be done (if necessary) before the output goes to the screen. In the context of this contrib. the output buffering was only necessary for the postOutput() function which is being commented out anyway. The postOutput() function was a work-around for multi-package shipments that originated outside the US. However, I couldn't get any errors to display when this function was being used. I've pretty much given up on it since I'm in the US. The short version of the above is that all references to ob_xxx could probably be taken out of the code and it will still work as intended (as long as your tracking codes originate in the US).
  13. heliosquare

    [Contribution] UPS XML Tracking

    Not to sound rude but what does this mean? Either you do or you don't. Can you post the contents of /catalog/tracking.php here? Please be sure to use the tags when you do...
  14. heliosquare

    [Contribution] UPS XML Tracking

    look at the browser source of your tracking.php page and you will see that it is completing. The html is cut off right at the point where it should be including /classes/tracking.php Make sure you have a copy of tracking.php in your classes directory...
  15. heliosquare

    [Contribution] UPS XML Tracking

    Perhaps those numbers were in a system that isn't accessible to the UPS XML API... The fact that you aren't seeing the errors has to do with the output buffering (I thought these changes were in the most recent downloadable?) Make the following changes: /classes/tracking.php ********************************* comment out the following 2 lines: ob_start('postOutput'); (should be near the top) ob_end_flush(); (at very bottom) /tracking.php ********************************* add the following 2 lines: ob_start(); (add this at very top of file after first <?php tag) ob_end_flush(); (add this a very bottom of file before last ?> tag) Those changes should make the code buffer the errors properly and display them on the screen.
×