sam_a Posted December 24, 2004 Share Posted December 24, 2004 Thanks for your quick reply Jan. That's exactly what I was looking for ! :D Any chance you'd also know how to resort these services? I tried to sort from highest to lowest, but got nowhere. Have a great holiday weekend everyone !!! Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 24, 2004 Share Posted December 24, 2004 That's exactly what I was looking forI haven't tested that out fully. This morning I realized it might conflict with something because it also changes the "type". That shouldn't be too hard to fix because then it can be changed a few lines down with the $_type variable that is used in the "title" (the info that is displayed to the customer).Any chance you'd also know how to resort these services?Actually, that behaviour is determined by osC if I remember correctly. I don't know where but perhaps I can find out. Merry Christmas to you too! Quote Link to comment Share on other sites More sharing options...
shukei98 Posted December 24, 2004 Share Posted December 24, 2004 Hi Janz, Here's the newest I got from my upsxml.log... ------------------------------------------DATE AND TIME: 2004-12-24 03:07:42 UPS URL: https://wwwcie.ups.com:443/ups.app/xml/TimeInTransit UPS REQUEST: <?xml version="1.0"?> <AccessRequest xml:lang="en-US"> <AccessLicenseNumber>xxxxxxxxxxxxx</AccessLicenseNumber> <UserId>xxxxxxxxx</UserId> <Password>xxxxxxx</Password> </AccessRequest> <?xml version="1.0"?> <TimeInTransitRequest xml:lang="en-US"> <Request> <TransactionReference> <CustomerContext>Time in Transit</CustomerContext> <XpciVersion>1.0001</XpciVersion> </TransactionReference> <RequestAction>TimeInTransit</RequestAction> </Request> <TransitFrom> <AddressArtifactFormat> <PoliticalDivision2>xxxxxxxxxx</PoliticalDivision2> <PoliticalDivision1>xx</PoliticalDivision1> <CountryCode>xx</CountryCode> <PostcodePrimaryLow>xxxxxxxx</PostcodePrimaryLow> </AddressArtifactFormat> </TransitFrom> <TransitTo> <AddressArtifactFormat> <PoliticalDivision2>xxxxxxxxxxxxx</PoliticalDivision2> <PoliticalDivision1>xxxxxxxxxx</PoliticalDivision1> <CountryCode>xx</CountryCode> <PostcodePrimaryLow>00000</PostcodePrimaryLow> <PostcodePrimaryHigh>00000</PostcodePrimaryHigh> </AddressArtifactFormat> </TransitTo> <PickupDate>20041225</PickupDate> <ShipmentWeight> <UnitOfMeasurement> <Code>KGS</Code> </UnitOfMeasurement> <Weight>10</Weight> </ShipmentWeight> <InvoiceLineTotal> <CurrencyCode>USD</CurrencyCode> <MonetaryValue>100</MonetaryValue> </InvoiceLineTotal> </TimeInTransitRequest> Error from cURL: Error [28]: SSL connection timeout UPS RESPONSE: ------------------------------------------ Time in Transit: 0 ------------------------------------------ DATE AND TIME: 2004-12-24 03:08:52 UPS URL: https://wwwcie.ups.com:443/ups.app/xml/Rate UPS REQUEST: <?xml version="1.0"?> <AccessRequest xml:lang="en-US"> <AccessLicenseNumber>xxxxxxxxxxxxxx</AccessLicenseNumber> <UserId>xxxxxxxx</UserId> <Password>xxxxxxxxx</Password> </AccessRequest> <?xml version="1.0"?> <RatingServiceSelectionRequest xml:lang="en-US"> <Request> <TransactionReference> <CustomerContext>Rating and Service</CustomerContext> <XpciVersion>1.0001</XpciVersion> </TransactionReference> <RequestAction>Rate</RequestAction> <RequestOption>shop</RequestOption> </Request> <PickupType> <Code>03</Code> </PickupType> <Shipment> <Shipper> <Address> <City>xxxxxxxxx</City> <StateProvinceCode>xx</StateProvinceCode> <CountryCode>xx</CountryCode> <PostalCode>xxxxxx</PostalCode> </Address> </Shipper> <ShipTo> <Address> <City>xxxxxxxxxx</City> <StateProvinceCode>xxxxxxxx</StateProvinceCode> <CountryCode>xx</CountryCode> <PostalCode>00000</PostalCode> <ResidentialAddressIndicator/> </Address> </ShipTo> <Package> <PackagingType> <Code>02</Code> </PackagingType> <PackageWeight> <UnitOfMeasurement> <Code>KGS</Code> </UnitOfMeasurement> <Weight>26</Weight> </PackageWeight> </Package> </Shipment> <CustomerClassification> <Code>03</Code> </CustomerClassification> </RatingServiceSelectionRequest> Error from cURL: Error [60]: SSL certificate problem, verify that the CA cert is OK UPS RESPONSE: DOes this means my exec() problem is gone? Now with a new problem? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 24, 2004 Share Posted December 24, 2004 Yep, your exec() problem seem sure gone. The 60 error is standard for Windows (and a lot of Linux distro's too I think). Easy to solve, uncomment a line (around 643) to: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); The SSL connection time out might have to do with the same error, but it might be temporary (because the UPS server might be to busy). Let's see. Quote Link to comment Share on other sites More sharing options...
shukei98 Posted December 24, 2004 Share Posted December 24, 2004 Thank you so much JanZ, it finally works! But with a minor error.. it shows: 111370: Unsupported Pickup Type I've tried changing all pickup types but not working. Do you think that I need to change this in my ups account or contact UPS? Regards, Steve Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 24, 2004 Share Posted December 24, 2004 Steve, Glad to hear the thing is working, kind of ;) I have no clue about the "Unsupported Pickup Type". If you have tried all of them either it is a UPS thing or UPS added a pickup type you are (supposed to be) using that is not in the contribution yet. Better get in touch with UPS about this. Quote Link to comment Share on other sites More sharing options...
richhoward Posted December 29, 2004 Share Posted December 29, 2004 I am new to this, and was curious, does this contribution create automated UPS Labels once setup? We are selling about 1,500 items and have to print new labels and spend about 2 hours everyday creating the same label over and over again, will this automatically do them for me, and i just throw them on the box? Thanks! Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted December 30, 2004 Share Posted December 30, 2004 does this contribution create automated UPS Labels once setupAlas, it only gets rates and estimated delivery dates from the UPS server, based on the shipping destination. With so many labels I can imagine you would like to have something automated, but I have not seen any mention of it in the forums/contributions. Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted January 3, 2005 Share Posted January 3, 2005 I'm having an issue with the UPS XML Contribution :lol: It seems to now have all the proper core functionality (time in transit, dimensions and more/less correct pricing) but there is one issue that just showed up. When I select a UPS method on the shipping page it pauses, sends data back to UPS again and then re-displays the shipping page - this time with double the package amount. For instance, if there are 4 packages and you go to checkout it calculates everything perfectly. You select what method you want and after several seconds it re-displays the shipping screen - this time with 8 packages and a small increase in fees. Anyone have any ideas? Other then this it seems to be perfect. You can see the store at http://www.frostysac.com/catalog and it's connecting only to demo servers so it's safe to test. I'd really appreciate some help if anyone knows what it could be :thumbsup: Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Marvin Miller Posted January 3, 2005 Share Posted January 3, 2005 Sorry about that guys - I managed to fix it by overwriting the upsxml.php file with the latest one in the contribution. Many thanks for a great contribution anyway :thumbsup: Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Marvin Miller Posted January 4, 2005 Share Posted January 4, 2005 Wooops, found one last issue - and it's a wierd one :x I'm seeing this error in the Admin section of osC when I click on Packaging; 1062 - Duplicate entry '6c6d33c8d59d1a7f662cac2e518a0287' for key 1 insert into sessions values ('6c6d33c8d59d1a7f662cac2e518a0287?Action=showupdatepackageform', '1104803423', 'language|s:7:\"english\";languages_id|s:1:\"1\";selected_box|s:13:\"configuration\";') [TEP STOP] Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 This error only occurs when I go into the osC admin and try and do anything with the packaging link. After the error occurs I get this error when trying to access any other link in the osC admin menu. The parse log of me clicking different links in the admin looks like this; 03/01/2005 16:22:25 [0.055s] /~frostysa/catalog/admin/stats_products_viewed.php?selected_box=reports&osCAdminID=5df8032d2e90d83bad9adf6dd681315e?Action=showconfirmdeletepackageform?Action=shownewpackageform 03/01/2005 16:22:59 [0.046s] /~frostysa/catalog/admin/backup.php?selected_box=tools&osCAdminID=5df8032d2e90d83bad9adf6dd681315e?Action=showconfirmdeletepackageform?Action=shownewpackageform 03/01/2005 16:23:02 [0.051s] /~frostysa/catalog/admin/packaging.php?osCAdminID=5df8032d2e90d83bad9adf6dd681315e?Action=showconfirmdeletepackageform?Action=shownewpackageform In the parse log snippet above you can see that it's still appending something from the packaging link into all my URL's - even though in one instance I am clicking on stats_product_viewed. I'm no expert but it looks to me like it's continually trying to enter the same session ID into the mySQL db in the sessions table. If I delete all sessions in the table and the open a new browser and go into the Admin and try and modify any of my custom package sizes the error will show again. I tried completely disabling my Browser's cache, removed the Proxy Server settings, deleted all cookies pertaining to my site thinking that they might be the cause. I also tried turning off caching in the osC Admin and that didn't work either - even though I set the cache to my own directory on the shared server. I'm at a loss to explain it. The last time I checked the package definitions side of the site was a while back. The only thing I can see is that it should be caused by my packaging.php file? Can someone take a look and tell me what's wrong? I finally had the shipping side of my site bug free with all functionality but now there's one more :'( Here's my packaging.php file in case it's needed. Sorry for such a long post and thanks in advance for the help ! :thumbsup: <?php /* $Id: packaging.php,v 1.00 2003/07/04 torinwalker Exp $ Copyright (c) 2003 Torin Walker This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; If not, you may obtain one by writing to and requesting one from The Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); ?> <!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> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"> <table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- 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="2"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="dataTableContent" width="75%" valign="top"> <?php $activeid = $_GET['id']; //********** New Package if(($_POST['name'] != "" && $_POST["Action"] == "newpackage") || ($_POST['id'] != "" && $_POST["Action"] == "updatepackage")) { if (number_format(trim($_POST['length']), 2, '.', '') <= 0) { $error = MIN_LENGTH_NOT_MET; } else if (number_format(trim($_POST['width']), 2, '.', '') <= 0) { $error = MIN_WIDTH_NOT_MET; } else if (number_format(trim($_POST['height']), 2, '.', '') <= 0) { $error = MIN_HEIGHT_NOT_MET; } else if (number_format(trim($_POST['empty_weight']), 2, '.', '') < 0) { $error = MIN_EMPTY_WEIGHT_NOT_MET; } else if (number_format(trim($_POST['max_weight']), 2, '.', '') < 0) { $error = MIN_MAX_WEIGHT_NOT_MET; } else { $sql_data_array = array( 'package_name' => $_POST['name'], 'package_description' => $_POST['description'], 'package_length' => $_POST['length'], 'package_width' => $_POST['width'], 'package_height' => $_POST['height'], 'package_empty_weight' => $_POST['empty_weight'], 'package_max_weight' => $_POST['max_weight'], 'package_cost' => $_POST['cost'] ); if ($_POST["Action"] == "newpackage") { tep_db_perform(TABLE_PACKAGING, $sql_data_array); } else { tep_db_perform(TABLE_PACKAGING, $sql_data_array, "update", "package_id = '" . $_POST['id'] . "'"); } } } //********** Delete Package if($_GET['id'] != "" && $_GET["Action"] == "deletepackage") { tep_db_query("delete from " . TABLE_PACKAGING . " where package_id = '" . $_GET['id'] . "'"); } // ********* Display Packages DisplayPackages($activeid, $error); switch ($Action) { case "shownewpackageform": showNewPackageForm(); break; case "showupdatepackageform": showUpdatePackageForm(); break; case "showconfirmdeletepackageform": showConfirmDeletePackageForm(); break; case "": default: showPackageInfoForm(); break; } //******************* function getPackages() { $packages = array(); $packages_query = tep_db_query("select * from " . TABLE_PACKAGING . " order by package_cost;"); while ($package = tep_db_fetch_array($packages_query)) { $packages[] = array( 'id' => $package['package_id'], 'name' => $package['package_name'], 'description' => $package['package_description'], 'length' => $package['package_length'], 'width' => $package['package_width'], 'height' => $package['package_height'], 'empty_weight' => $package['package_empty_weight'], 'max_weight' => $package['package_max_weight'], 'cost' => $package['package_cost'] ); } return $packages; } //************************ DisplayPackages() // shows the main menu, lists the admins function DisplayPackages($activeid,$error) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2" width="100%"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo HEADING_NAME; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo HEADING_DESCRIPTION; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo HEADING_LENGTH; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo HEADING_WIDTH; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo HEADING_HEIGHT; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo HEADING_EMPTY_WEIGHT; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo HEADING_MAX_WEIGHT; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo HEADING_COST; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo HEADING_ACTION; ?></td> </tr> <?php $packages = getPackages(); if (count($packages) == 0) { echo '<tr><td colspan="8">' . NO_PACKAGES_DEFINED . '</td></tr>'; } if ($error != "") { echo '<SPAN class="errorText">'.$error.'</SPAN>'; } for ($i = 0; $i < count($packages); $i++) { if (($_GET["Action"] != "shownewpackageform") && ($error == "")) { if ($activeid == "") { $activeid = $packages[0]['id']; } } if ($activeid == $packages[$i]['id']) { echo '<tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_PACKAGING, 'id=' . $packages[$i]['id'] ).'\'">' . "\n"; } else { echo '<tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_PACKAGING, 'id=' .$packages[$i]['id'] ). '\'">' . "\n"; } echo '<td class="dataTableContent" align="left"><br>' . $packages[$i]['name'] . '</td>'; echo '<td class="dataTableContent" align="left"><br>' . $packages[$i]['description'] . '</td>'; echo '<td class="dataTableContent" align="center"><br>' . $packages[$i]['length'] . '</td>'; echo '<td class="dataTableContent" align="center"><br>' . $packages[$i]['width'] . '</td>'; echo '<td class="dataTableContent" align="center"><br>' . $packages[$i]['height'] . '</td>'; echo '<td class="dataTableContent" align="center"><br>' . $packages[$i]['empty_weight'] . '</td>'; echo '<td class="dataTableContent" align="center"><br>' . $packages[$i]['max_weight'] . '</td>'; echo '<td class="dataTableContent" align="center"><br>' . $packages[$i]['cost'] . '</td>'; if ($activeid == $packages[$i]['id'] ) { echo '<td>' . tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<td><a href="' . tep_href_link(FILENAME_PACKAGING, 'id=' . $packages[$i]['id'] ). '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', ICON_INFO) . '</a>'; } } echo '</td></tr></table><br>'; echo '<a href="' . tep_href_link( FILENAME_PACKAGING ) . '?Action=shownewpackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_new_package.gif', NEW_ADMIN).'</a> '; echo '<a href="' . tep_href_link( FILENAME_PACKAGING ) . '?Action=showupdatepackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_edit.gif', NEW_ADMIN).'</a> '; echo '<a href="' . tep_href_link( FILENAME_PACKAGING ) . '?Action=showconfirmdeletepackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_delete.gif', NEW_ADMIN).'</a>'; echo '</td><td class="infoBoxContent" valign="top">'; } //****************************** showNewPackageForm() // Show the form to create a new package function showNewPackageForm() { $packages = getPackages(); $cost = 0; for ($i = 0; $i < count($packages); $i++) { if ($packages[$i]['cost'] > $cost) { $cost = $packages[$i]['cost'] + 1; } } echo "<table cellspacing='0' width='100%' cellpadding='0'> <tr><td colspan='2' class='infoBoxHeading'>". CREATE_NEW_PACKAGE."</td></tr></table>"; echo tep_draw_form("newpackage", FILENAME_PACKAGING); echo tep_draw_hidden_field("Action", "newpackage"); echo '<table><tr><td class="infoBoxContent"><b>'.HEADING_NAME.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_NAME_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("name").'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_DESCRIPTION.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_DESCRIPTION_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("description").'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_LENGTH.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_LENGTH_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("length").'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_WIDTH.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_WIDTH_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("width").'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_HEIGHT.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_HEIGHT_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("height").'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_EMPTY_WEIGHT.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_EMPTY_WEIGHT_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("empty_weight").'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_MAX_WEIGHT.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_MAX_WEIGHT_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("max_weight").'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_COST.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_COST_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("cost", $cost).'</td></tr>'; echo '<tr><td colspan="2">'. tep_image_submit('button_confirm.gif', 'Save these values as a new package.'); echo ' <a href="' . tep_href_link( FILENAME_PACKAGING,'id='.$_GET["id"] ) . '">'.tep_image_button('button_cancel.gif', IMAGE_CANCEL) .'</A>'; echo "</td></tr></table>"; echo ("</form>"); } //****************************** showUpdatePackageForm() // Show the form to update a package function showUpdatePackageForm() { $packages = getPackages(); $activepackage = $packages[0]; if ($_GET['id'] != "") { for ($i = 0; $i < count($packages); $i++) { if ($_GET['id'] == $packages[$i]['id']) { $activepackage = $packages[$i]; } } } echo "<table cellspacing='0' width='100%' cellpadding='0'> <tr><td colspan='2' class='infoBoxHeading'>". UPDATE_PACKAGE."</td></tr></table>"; echo tep_draw_form("updatepackage", FILENAME_PACKAGING.'?id='.$_GET['id']); echo tep_draw_hidden_field("Action", "updatepackage"); echo tep_draw_hidden_field("id", $activepackage['id']); echo '<table><tr><td class="infoBoxContent"><b>'.HEADING_NAME.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_NAME_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("name", $activepackage['name']).'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_DESCRIPTION.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_DESCRIPTION_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("description", $activepackage['description']).'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_LENGTH.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_LENGTH_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("length", $activepackage['length']).'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_WIDTH.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_WIDTH_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("width", $activepackage['width']).'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_HEIGHT.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_HEIGHT_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("height", $activepackage['height']).'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_EMPTY_WEIGHT.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_EMPTY_WEIGHT_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("empty_weight", $activepackage['empty_weight']).'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_MAX_WEIGHT.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_MAX_WEIGHT_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("max_weight", $activepackage['max_weight']).'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_COST.'</b></td></tr><tr><td class="infoBoxContent">'.HEADING_COST_TEXT.'</td></tr><tr><td class="infoBoxContent">'.tep_draw_input_field("cost", $activepackage['cost']).'</td></tr>'; echo '<tr><td colspan="2">'. tep_image_submit('button_confirm.gif', 'Update the package with these values.'); echo ' <a href="' . tep_href_link( FILENAME_PACKAGING,'id='.$_GET["id"] ) . '">'.tep_image_button('button_cancel.gif', IMAGE_CANCEL) .'</a>'; echo "</td></tr></table>"; echo ("</form>"); } //*************************** showConfirmDeletePackageForm() // Shows the form to confirm package deletion function showConfirmDeletePackageForm() { $packages = getPackages(); $package_name = ""; for ($i = 0; $i < count($packages); $i++) { if ($packages[$i]['id'] == $_GET['id']) { $package_name = $packages[$i]['name']; } } echo "<table cellspacing='0' width='100%' cellpadding='0'> <tr><td colspan='2' class='infoBoxHeading'>". DELETE_PACKAGE."</td></tr></table>"; echo '<table cellpadding="5"><tr><td class="infoBoxContent">'.CONFIRM_DELETE.'</td></tr>'; echo "<tr><td>".$package_name."</td></td>"; echo "<tr><td>"; //echo tep_image_submit('button_confirm.gif', 'ok'); echo '<a href="' . tep_href_link( FILENAME_PACKAGING,'Action=deletepackage&id='.$_GET["id"] ) . '">'.tep_image_button('button_confirm.gif', IMAGE_CONFIRM) .'</a>'; echo ' <a href="' . tep_href_link( FILENAME_PACKAGING,'id='.$_GET["id"] ) . '">'.tep_image_button('button_cancel.gif', IMAGE_CANCEL) .'</a>'; echo '</td></tr></table>'; } //************************ ShowPackageInfo() // Shows the info a package function showPackageInfoForm() { $packages = getPackages(); $activepackage = $packages[0]; $activeid = $_GET["id"]; if ($activeid != "") { for ($i = 0; $i < count($packages); $i++) { if ($activeid == $packages[$i]['id']) { $activepackage = $packages[$i]; } } } if ($error != "") { echo '<SPAN class="errorText">'.$error.'</SPAN>'; } echo "<table cellspacing='0' width='100%' cellpadding='0'><tr><td colspan='2' class='infoBoxHeading'>". HEADING_INFO ."</td></tr></table>"; if (count($packages) != 0) { echo '<table>'; echo '<tr><td class="infoBoxContent"><b>'. HEADING_NAME .'</b></td></tr><tr><td class="infoBoxContent">'.$activepackage['name'].'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'. HEADING_DESCRIPTION.'</b></td></tr><tr><td class="infoBoxContent">'.$activepackage['description'].'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'. HEADING_LENGTH .'</b></td></tr><tr><td class="infoBoxContent">'.$activepackage['length'].'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'. HEADING_WIDTH .'</b></td></tr><tr><td class="infoBoxContent">'.$activepackage['width'].'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'. HEADING_HEIGHT .'</b></td></tr><tr><td class="infoBoxContent">'.$activepackage['height'].'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'.HEADING_EMPTY_WEIGHT.'</b></td></tr><tr><td class="infoBoxContent">'.$activepackage['empty_weight'].'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'. HEADING_MAX_WEIGHT .'</b></td></tr><tr><td class="infoBoxContent">'.$activepackage['max_weight'].'</td></tr>'; echo '<tr><td class="infoBoxContent"><b>'. HEADING_COST .'</b></td></tr><tr><td class="infoBoxContent">'.$activepackage['cost'].'</td></tr>'; echo "</table>"; } echo ""; } ?> </td> </tr> </table> </td> <!-- body_text_eof //--></tr> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Marvin Miller Posted January 4, 2005 Share Posted January 4, 2005 I think I got it straightened out :D In my admin/configure.php I had this line; define('HTTP_SERVER', 'https:host212.ipowerweb.com'); I changed it to; define('HTTP_SERVER', 'http://www.frostysac.com'); And now everything works perfectly. :thumbsup: Strange thing is, I haven't changed that file for months. Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Jan Zonjee Posted January 4, 2005 Share Posted January 4, 2005 Good to hear you solved your problem, but still I think there is code in this file that looks fishy. For example: ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING ). '?Action=shownewpackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_new_package.gif', NEW_ADMIN).'</a> '; ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING) . '?Action=showupdatepackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_edit.gif', NEW_ADMIN).'</a> '; ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING ) . '?Action=showconfirmdeletepackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_delete.gif', NEW_ADMIN).'</a>'; My guess is it should be something like (tep_href_link(filename, parameters, optional SSL/NONSSL)): ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING , 'Action=shownewpackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_new_package.gif', NEW_ADMIN).'</a> '; ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING , 'Action=showupdatepackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_edit.gif', NEW_ADMIN).'</a> '; ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING , 'Action=showconfirmdeletepackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_delete.gif', NEW_ADMIN).'</a>'; Actually, I'm not convinced the id=' . $_GET['id'] is needed also, osC code should take care of that. Quote Link to comment Share on other sites More sharing options...
stschindler Posted January 5, 2005 Share Posted January 5, 2005 Sorry, I am just getting into this,- how do I set up UPS for this module? Do I need any of their shipping tools, or will my account number suffice? Thanks a bunch, Stephan :blink: :blink: Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted January 5, 2005 Share Posted January 5, 2005 Thanks for your input Jan - I wish I understood PHP much better. Your suggestions make sense because the problem only starts when I click on that particular link. It was 'fixed' by changing that entry in my admin's configure.php so I hope it will stay that way. Either way I'm kind of stuck with using contributions (copy & paste)because I don't have someone in-house like yourself who really understands this stuff to come in and truly fix things up :D One day I'll find that magical programmer who eats sleeps and breathes everything I need done :D :thumbsup: Good to hear you solved your problem, but still I think there is code in this file that looks fishy. For example: ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING ). '?Action=shownewpackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_new_package.gif', NEW_ADMIN).'</a> '; ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING) . '?Action=showupdatepackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_edit.gif', NEW_ADMIN).'</a> '; ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING ) . '?Action=showconfirmdeletepackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_delete.gif', NEW_ADMIN).'</a>'; My guess is it should be something like (tep_href_link(filename, parameters, optional SSL/NONSSL)): ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING , 'Action=shownewpackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_new_package.gif', NEW_ADMIN).'</a> '; ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING , 'Action=showupdatepackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_edit.gif', NEW_ADMIN).'</a> '; ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING , 'Action=showconfirmdeletepackageform&id=' . $_GET['id'] . '">'.tep_image_button('button_delete.gif', NEW_ADMIN).'</a>'; Actually, I'm not convinced the id=' . $_GET['id'] is needed also, osC code should take care of that. <{POST_SNAPBACK}> Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Jan Zonjee Posted January 5, 2005 Share Posted January 5, 2005 how do I set up UPS for this module? Do I need any of their shipping tools, or will my account number suffice? <{POST_SNAPBACK}> You need an access key, user name and password that you should get from UPS. User name and password are the same as is used for their website, but I think you should ask them for an access key. Sorry, did not arrange these things myself. However, you don't need any software from them. This module should more or less work from the box. Getting cURL to behave on the server is usually the bottle neck. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted January 5, 2005 Share Posted January 5, 2005 the problem only starts when I click on that particular link.I will install it on a test server, to see where the problems are. Might take one, two weeks to fix, unless somebody more knowledgeable fixes it sooner ;) Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted January 6, 2005 Share Posted January 6, 2005 Jan; I didn't mean you had to track it down for me :D I was just griping that I don't have the ability to actually understand why the things you found in the code aren't quite right. I only understand on a more instinctive level. Ie: there must be something wrong with the code on that page due to the way it messes up only when that particular link is clicked on. The admin side is working now so it doesn't seem to be a vital issue. At the present time the site is hosted on a shared server so I can't enable cookies or get 'proper' SSL operation. My only concern is that when I move it to a dedicated server and change the configuration files I hope there won't be any 'new' errors :D Please don't think I was expecting you to do a whole lot of work to troubleshoot this issue. It's very kind of you to drop in from time to time and answer questions as it is. Without people like yourself I would never have been able to get all the contributions installed in my site and working perfectly - for me it's quite a feat and really neat :D Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Jan Zonjee Posted January 6, 2005 Share Posted January 6, 2005 Please don't think I was expecting you to do a whole lot of work to troubleshoot this issue. Thanks, I realize I didn't write that code so can't be considered reponsible. However, it still bothers me. I'm not a professional PHP-programmer but hopefully understand enough of it to fix things. It would be a waste if people couldn't use this feature, while the contrib says you can, because nobody bothers to fix a few issues that might be simple. Can't promise I can make it work, but I will give it a try :thumbsup: Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted January 6, 2005 Share Posted January 6, 2005 (edited) Marvin, As suspected that particular piece of code [in admin/packaging.php] did cause the trouble. I could easily trigger the error by setting my browser to not accept any cookies (this will put the osCadmin=98fg8g9889hds_etc. in the url). I could solve all that by changing those lines (around line 187 and further) to: ? ?// add to admin/includes/languages/english.php: define('IMAGE_NEW_PACKAGE', 'New Package'); ? ?echo '</td></tr></table><br>'; ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING , 'Action=shownewpackageform&id='.$_GET['id'].'') . ?'">'.tep_image_button('button_new_package.gif', IMAGE_NEW_PACKAGE).'</a> '; ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING , 'Action=showupdatepackageform&id='.$_GET['id'].'') . '">'.tep_image_button('button_edit.gif', IMAGE_EDIT).'</a> '; ? ? ?echo '<a href="' . tep_href_link( FILENAME_PACKAGING , 'Action=showconfirmdeletepackageform&id='.$_GET['id'].'') . '">'.tep_image_button('button_delete.gif', IMAGE_DELETE).'</a>'; ? ? ?echo '</td><td class="infoBoxContent" valign="top">'; } //****************************** ? showNewPackageForm() I noticed the alt links for the images were all NEW_ADMIN, which is not defined in my osC, so I changed that too. For it to work you should also add the following line to admin/includes/languages/english.php: define('IMAGE_NEW_PACKAGE', 'New Package'); This might have been the only thing that needed fixing, let's see. Edited January 6, 2005 by JanZ Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted January 7, 2005 Share Posted January 7, 2005 Hi Jan; I just updated both files (I too did not have define 'IMAGE_NEW_PACKAGE', 'New Package') in my english.php I then tested making new boxes and modifying existing ones and everything works perfectly. I also tested the entire shipping module's dimension features by creating a large enough box for two items and it wisely chose to use one box. I then re-tested using the 'ship in it's own box' option and it went back to using both original boxes for shipping :D I'd say it's perfect! I didn't try changing back my admin's configure.php to the old URL entry because I believe you've cased it entirely :thumbsup: Many thanks for that! I have an unrelated question that I was wondering if you could help with. There's a contrib called Separate Pricing and I installed it a while back (several times in fact.) I finally got all the bugs out of it except one. On two different pages it does not display the proper price. All the other pages display the proper adjusted price so I think the original contrib developer forgot about adding code to them. One is products.new.php and I forget what the other is. What do you think the chances are of your looking at that if I go through and re-install the contribution and add all the bug fixes from the discussions about it? I know there are a lot of people who also got it to the point where it was nearly bug free so many are eager to see it 100% instead of 98% complete. The last 2% is really frustrating a lot of people. If you're not up to it I would understand perfectly - I just think there's probably not much to it to complete it and a lot of people would go nuts if it were :) Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Jan Zonjee Posted January 7, 2005 Share Posted January 7, 2005 Marvin, Glad to hear things are working as they should, but I'm not sure if this is all code that needs a little fixing. I'll need some more time to go through it all. I believe you also had trouble with the weight not totalling correctly. Was that fixed by one of the versions? Regarding the Separate Pricing per Customer... interesting mod, might need it myself one day. I wouldn't mind taking a look at it, but it would be helpful if you could tell me where the trouble spots where. I didn't see a thread mentioned in the contributions section, would have been helpful to keep all info in one place. Oh well, haven't looked for it yet. Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted January 7, 2005 Share Posted January 7, 2005 I believe you also had trouble with the weight not totalling correctly. Was that fixed by one of the versions? Good thing you reminded me.... I just checked the displayed weight during checkout and it's out by a lot. This is using dimensions and with 5 test products. What I did is define 5 test boxes for the 5 test products. Each box is 1" larger in all dimensions and can handle the weight of the item. I defined a weight of each box of zero. According to my train of thought, the 5 items should only fit into their 5 boxes. On checkout it will show 51.98 lbs for 2 boxes. This is when I have all 5 items in the cart and it should be showing 75.98 lbs and 5 boxes! Try as I might I can't find a pattern to it. Sometimes with 3 items in the cart that fall below a certain weight range it calculates properly. But if you add one more item then it falls back down to a level of weight that is way too low.... This is really important for obvious reasons. Are you seeing the same thing? Can you shed any light into this? Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Jan Zonjee Posted January 7, 2005 Share Posted January 7, 2005 This is really important for obvious reasons.You are right, and this time I have no clue what goes wrong. The packing code is in the upsxml.php file and apparently still not working right. I wish it wasn't true :( Quote Link to comment Share on other sites More sharing options...
Marvin Miller Posted January 7, 2005 Share Posted January 7, 2005 Are you seeing the same issues on your side? Quote Best & Thanks;Marvin----------------------osCommerce 2.3.3.4 Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.