Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

gotham

Pioneers
  • Posts

    22
  • Joined

  • Last visited

Profile Information

  • Real Name
    Kendall
  • Location
    Brooklyn, New York
  • Interests
    build<br />design<br />invent<br />collaborate<br />art of life and living science<br />
  • Website

gotham's Achievements

  1. Working on getting this up and production ready for me. I noticed that when you click on an item with a textarea that was already in your cart the product_info.php page did not repopulate the textarea field with the cart data as it did with text fields. This is due to textareas not supporting "value=". It might be kind of silly that any of the fields are sticky anyway, as when they are changed the result is not a change to that item's attributes but rather the addition of a new item to the cart. But I think that consistency is better. I would really love it if we could figure out how customers could edit the products attributes of items already in the cart. So here is a fix to the textarea not being sticky: product_info.php Find: value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] . '"></textarea> Replace with: id="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" >' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] . ' </textarea>' . ' I also noticed that long entries by a customer into a textarea field breaks the virtual flow of text on the checkout_confirmation.php page. The fix is to simply delete all occurences of: "<nobr>" and "</nobr>" in checkout_confirmation.php.
  2. I am planning on getting this contribution better supported and improved. I'm not an expert programmer so I may not be a great source of coding help but I'm willing to try. Maybe others will lend their experience as well. I'm trying to get a new complete package working right now. Any interest? I've put together installation instructions but need help testing... Thanks!
  3. I would also suggest a much simpler solution. Setup your credit card processor to do just auths rather than sales. This is so you can adjust the final charge slightly. Then setup instate sales to be charged one estimated prevailing rate. Then as each instate sale comes in use the State provided Jurisdictional Online Tool (NYS has one) to retrieve both the Jurisdictional rate and Jurisdictional Reporting Code (you need the reporting code to file the sales tax payment). Compare the rate charged and the correct rate. Using Order Editor add a line to the Totals column of the order saying "Adjustment for Sate Tax " and correct the invoice. Then convert the auth to a sale and correct the final amount to be charged to the customer. This seems like a lot but it really isn't. Here is why: you have to check the State provided Jurisdictional Online Tool anyway (even with this contribution installed) as zip codes do go across tax boundaries. And the contribution does not give you the Jurisdictional Reporting Code which you need on the tax forms (this would be a nice enhancement of the contribution) so you have to look it up. Even with the contribution installed I still end up looking it up! Be aware that the NYS provided Jurisdictional Online Tool does go down from time to time so be prepared (using the tax form) to estimate yourself. Hope this helps! Wouldn't it be great if we only had 1 tax rate per state (or none)!
  4. I use the contribution and it works well for me. I did have to do a lot of modification to get it to work. I could give out copies of any files you want but they are heavily modified including MVS and 30+ more. email me if you want copies.
  5. Oh yes it does work! I have three very busy live stores using it for years now. Very good code. You'll get it worked out!
  6. to includes/languages/english/modules/vendoer_shipping/usps.php I added: define('MODULE_SHIPPING_USPS_TEXT_OPT_MM', 'Media Mail'); Here is my includes/modules/vendoer_shipping/usps.php: <?php /* $Id: usps.php,v 1.47 2003/04/08 23:23:42 dgw_ Exp $ ++++ modified as USPS Methods 2.5 08/02/03 by Brad Waite and Fritz Clapp ++++ Modified for MVS by Rick Knight osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ class usps { var $code, $title, $description, $icon, $enabled, $countries; // class constructor function usps() { global $order; // Added MVS // $this->vendors_id = ($products['vendors_id'] <= 0) ? 1 : $products['vendors_id']; // End ADD $this->code = 'usps'; $this->title = MODULE_SHIPPING_USPS_TEXT_TITLE; $this->description = MODULE_SHIPPING_USPS_TEXT_DESCRIPTION; $this->icon = DIR_WS_ICONS . 'ups_fedex_usps_shipping-18.jpg'; $this->delivery_country_id = $order->delivery['country']['id']; $this->delivery_zone_id = $order->delivery['zone_id']; // Removed MVS /* $this->sort_order = MODULE_SHIPPING_USPS_SORT_ORDER; $this->tax_class = MODULE_SHIPPING_USPS_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_USPS_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_USPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } End of Remove */ $this->types = array('EXPRESS' => 'Express Next Day Guaranteed (1 day average)', 'FIRST CLASS' => 'Light Item Delivery (3-7 days average)', 'PRIORITY' => 'Priority (2-3 days average)', 'MEDIA' => 'Ground Saver (3-9 days average)', // kqm added 'PARCEL' => 'Ground Standard (1-5 days average)'); $this->intl_types = array( 'Global Express' => 'Global Express Guaranteed', 'Global Express Non-Doc Rect' => 'Global Express Guaranteed Non-Document Rectangular', 'Global Express Non-Doc Non-Rect' => 'Global Express Guaranteed Non-Document Non-Rectangular', 'Express Mail Int' => 'Express Mail International (EMS)', 'Express Mail Int Flat Rate Env' => 'Express Mail International (EMS) Flat Rate Envelope', 'Priority Mail Int' => 'Priority Mail International', 'Priority Mail Int Flat Rate Env' => 'Priority Mail International Flat Rate Envelope', 'Priority Mail Int Flat Rate Box' => 'Priority Mail International Flat Rate Box', 'First-Class Mail Int' => 'First-Class Mail International' ); $this->countries = $this->country_list(); } // MVS ADD function sort_order($vendors_id='1') { $sort_order = @constant ('MODULE_SHIPPING_USPS_SORT_ORDER_' . $vendors_id); if (isset ($sort_order)) { $this->sort_order = $sort_order; } else { // $this->sort_order = '0'; KQM changed USPS May 14th Int'l Update $this->sort_order = '-'; } return $this->sort_order; } function tax_class($vendors_id='1') { $this->tax_class = constant('MODULE_SHIPPING_USPS_TAX_CLASS_' . $vendors_id); return $this->tax_class; } /* function enabled($vendors_id='1') { $this->enabled = false; $status = @constant('MODULE_SHIPPING_USPS_STATUS_' . $vendors_id); if (isset ($status) && $status != '') { $this->enabled = (($status == 'True') ? true : false); }*/ function enabled($vendors_id='1') { $this->enabled = false; $status = @constant('MODULE_SHIPPING_USPS_STATUS_' . $vendors_id); if (isset ($status) && $status != '') { $this->enabled = (($status == 'True') ? true : false); } if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_USPS_ZONE_' . $vendors_id) > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_USPS_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_country_id . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $this->delivery_zone_id) { $check_flag = true; brea聫; } } if ($check_flag == false) { $this->enabled = false; }//if }//if return $this->enabled; } function zones($vendors_id='1') { /* if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_USPS_ZONE_' . $vendors_id) > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_USPS_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_zone_id . "' order by zone_id"); */ if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_USPS_ZONE_' . $vendors_id) > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_USPS_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_country_id . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $this->delivery_zone_id) { $check_flag = true; break; } //if }//while if ($check_flag == false) { $this->enabled = false; }//if }//if return $this->enabled; }//function // EOADD MVS // class methods // Changed MVS // function quote($method = '') { function quote($method = '', $module = '', $vendors_id = '1') { // EOCHANGE // BOF: UPS USPS global $HTTP_POST_VARS, $shipping_weight, $order, $cart, $shipping_num_boxes; if ( tep_not_null($method) && (isset($this->types[$method]) || in_array($method, $this->intl_types)) ) { $this->_setService($method); } $this->_setMachinable('False'); $this->_setContainer('None'); $this->_setSize('REGULAR'); // usps doesnt accept zero weight $shipping_weight = ($shipping_weight < 0.1 ? 0.1 : $shipping_weight); $shipping_pounds = floor ($shipping_weight); $shipping_ounces = round(16 * ($shipping_weight - floor($shipping_weight))); $this->_setWeight($shipping_pounds, $shipping_ounces); // BOF: UPS USPS if (in_array('Display weight', explode(', ', constant('MODULE_SHIPPING_USPS_OPTIONS_' . $vendors_id)))) { $shiptitle = ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs)'; } else { $shiptitle = ''; } // EOF: UPS USPS $uspsQuote = $this->_getQuote($vendors_id); if (is_array($uspsQuote)) { if (isset($uspsQuote['error'])) { $this->quotes = array('module' => $this->title, 'error' => $uspsQuote['error']); } else { // Added MVS $vendors_data_query = tep_db_query("select handling_charge, handling_per_box, vendor_country, vendors_zipcode from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); $country_name = tep_get_countries($vendors_data['vendor_country'], true); $handling_charge = $vendors_data['handling_charge']; $handling_per_box = $vendors_data['handling_per_box']; if ($handling_charge > $handling_per_box*$shipping_num_boxes) { // NEXT LINE FIXED THE USPS HANDLING FEE PROBLEM by KQM // $handling = $handling_charge; kqm attempt to fix handling $handling = $handling_charge + @constant ('MODULE_SHIPPING_USPS_HANDLING_' . $vendors_id); } else { // NEXT LINE FIXED THE USPS HANDLING FEE PROBLEM by KQM // $handling = $handling_per_box*$shipping_num_boxes; $handling = ($handling_per_box*$shipping_num_boxes) + @constant ('MODULE_SHIPPING_USPS_HANDLING_' . $vendors_id); } // EOADD MVS /* Original $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs)'); */ // BOF: UPS USPS $this->quotes = array('id' => $this->code, 'module' => $this->title . $shiptitle); // EOF: UPS USPS $methods = array(); $size = sizeof($uspsQuote); for ($i=0; $i<$size; $i++) { list($type, $cost) = each($uspsQuote[$i]); // BOF: UPS USPS $title = ((isset($this->types[$type])) ? $this->types[$type] : $type); if(in_array('Display transit time', explode(', ', constant('MODULE_SHIPPING_USPS_OPTIONS_' . $vendors_id)))) $title .= $transittime[$type]; /* ORIGINAL $methods[] = array('id' => $type, 'title' => ((isset($this->types[$type])) ? $this->types[$type] : $type), 'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes); */ $methods[] = array('id' => $type, 'title' => $title, 'cost' => ($cost + $handling) * $shipping_num_boxes); } // EOF: UPS USPS $this->quotes['methods'] = $methods; // $this->tax_class = constant(MODULE_SHIPPING_USPS_TAX_CLASS_ . $vendors_id); if ($this->tax_class($vendors_id) > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class($vendors_id), $order->delivery['country']['id'], $order->delivery['zone_id']); } } } else { $this->quotes = array('module' => $this->title, 'error' => MODULE_SHIPPING_USPS_TEXT_ERROR); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); return $this->quotes; } // MVS Added/Changed // function check() { function check($vendors_id = '1') { //EOMVS if (!isset($this->_check)) { // MVS Added/Changed // $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_USPS_STATUS'"); $check_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_USPS_STATUS_" . $vendors_id . "'"); // EOMVS $this->_check = tep_db_num_rows($check_query); } return $this->_check; } // MVS Added/Changed /* function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable USPS Shipping', 'MODULE_SHIPPING_USPS_STATUS', 'True', 'Do you want to offer USPS shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Enter the USPS User ID', 'MODULE_SHIPPING_USPS_USERID', 'NONE', 'Enter the USPS USERID assigned to you.', '6', '0', now())"); // BOF: UPS USPS tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Enter the USPS Password', 'MODULE_SHIPPING_USPS_PASSWORD', 'NONE', 'See USERID, above.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Which server to use', 'MODULE_SHIPPING_USPS_SERVER', 'production', 'An account at USPS is needed to use the Production server', '6', '0', 'tep_cfg_select_option(array(\'test\', \'production\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_USPS_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_USPS_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_USPS_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_USPS_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Domestic Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES', 'EXPRESS, PRIORITY, FIRST CLASS, PARCEL', 'Select the domestic services to be offered:', '6', '14', 'tep_cfg_select_multioption(array(\'EXPRESS\', \'PRIORITY\', \'FIRST CLASS\', \'PARCEL\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Int\'l Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES_INTL', 'GXG Document, GXG Non-Document, EXPRESS, Priority Lg, Priority Sm, Priority Var, Airmail Letter, Airmail Parcel, Surface Letter, Surface Post', 'Select the international services to be offered:', '6', '15', 'tep_cfg_select_multioption(array(\'GXG Document\', \'GXG Non-Document\', \'EXPRESS\', \'Priority Lg\', \'Priority Sm\', \'Priority Var\', \'Airmail Letter\', \'Airmail Parcel\', \'Surface Letter\', \'Surface Post\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('USPS Options', 'MODULE_SHIPPING_USPS_OPTIONS', 'Display weight, Display transit time', 'Select from the following the USPS options.', '6', '16', 'tep_cfg_select_multioption(array(\'Display weight\', \'Display transit time\'), ', now())"); // EOF: UPS USPS } */ function install($vendors_id = '1') { tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Enable USPS Shipping', 'MODULE_SHIPPING_USPS_STATUS_" . $vendors_id . "', 'True', 'Do you want to offer USPS shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Enter the USPS User ID', 'MODULE_SHIPPING_USPS_USERID_" . $vendors_id . "', 'NONE', 'Enter the USPS USERID assigned to you.', '6', '0', now(), '" . $vendors_id . "')"); // BOF: UPS USPS tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Enter the USPS Password', 'MODULE_SHIPPING_USPS_PASSWORD_" . $vendors_id . "', 'NONE', 'See USERID, above.', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Which server to use', 'MODULE_SHIPPING_USPS_SERVER_" . $vendors_id . "', 'production', 'An account at USPS is needed to use the Production server', '6', '0', 'tep_cfg_select_option(array(\'test\', \'production\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Handling Fee', 'MODULE_SHIPPING_USPS_HANDLING_" . $vendors_id . "', '0', 'Handling fee for this shipping method.', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Tax Class', 'MODULE_SHIPPING_USPS_TAX_CLASS_" . $vendors_id . "', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Shipping Zone', 'MODULE_SHIPPING_USPS_ZONE_" . $vendors_id . "', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Sort Order', 'MODULE_SHIPPING_USPS_SORT_ORDER_" . $vendors_id . "', '0', 'Sort order of display.', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Domestic Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES_" . $vendors_id . "', 'EXPRESS, PRIORITY, FIRST CLASS, MEDIA, PARCEL', 'Select the domestic services to be offered:', '6', '14', 'tep_cfg_select_multioption(array(\'EXPRESS\', \'PRIORITY\', \'FIRST CLASS\', \'MEDIA\', \'PARCEL\'), ', now(), '" . $vendors_id . "')"); // Modified by KQM for Media Mail tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Int\'l Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES_INTL_" . $vendors_id . "', 'Global Express, Global Express Non-Doc Rect, Global Express Non-Doc Non-Rect, Express Mail Int, Express Mail Int Flat Rate Env, Priority Mail Int, Priority Mail Int Flat Rate Env, Priority Mail Int Flat Rate Box, First-Class Mail Int', 'Select the international services to be offered:', '6', '15', 'tep_cfg_select_multioption(array(\'Global Express\', \'Global Express Non-Doc Rect\', \'Global Express Non-Doc Non-Rect\', \'Express Mail Int\', \'Express Mail Int Flat Rate Env\', \'Priority Mail Int\', \'Priority Mail Int Flat Rate Env\', \'Priority Mail Int Flat Rate Box\', \'First-Class Mail Int\'), ', now(), '" . $vendors_id . "')"); // Modified by KQM for USPS May 14th Int'l Update tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('USPS Options', 'MODULE_SHIPPING_USPS_OPTIONS_" . $vendors_id . "', 'Display weight, Display transit time', 'Select from the following the USPS options.', '6', '16', 'tep_cfg_select_multioption(array(\'Display weight\', \'Display transit time\'), ', now(), '" . $vendors_id . "')"); // EOF: UPS USPS } // EOADD // MVS Added/Changed /* function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } */ function remove($vendors_id) { tep_db_query("delete from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key in ('" . implode("', '", $this->keys($vendors_id)) . "')"); } // EOADD // MVS Added/Changed /* function keys() { // BOF: UPS USPS // ORIGINAL return array('MODULE_SHIPPING_USPS_STATUS', 'MODULE_SHIPPING_USPS_USERID', 'MODULE_SHIPPING_USPS_PASSWORD', 'MODULE_SHIPPING_USPS_SERVER', 'MODULE_SHIPPING_USPS_HANDLING', 'MODULE_SHIPPING_USPS_TAX_CLASS', 'MODULE_SHIPPING_USPS_ZONE', 'MODULE_SHIPPING_USPS_SORT_ORDER'); return array('MODULE_SHIPPING_USPS_STATUS', 'MODULE_SHIPPING_USPS_USERID', 'MODULE_SHIPPING_USPS_PASSWORD', 'MODULE_SHIPPING_USPS_SERVER', 'MODULE_SHIPPING_USPS_HANDLING', 'MODULE_SHIPPING_USPS_TAX_CLASS', 'MODULE_SHIPPING_USPS_ZONE', 'MODULE_SHIPPING_USPS_SORT_ORDER', 'MODULE_SHIPPING_USPS_OPTIONS', 'MODULE_SHIPPING_USPS_TYPES', 'MODULE_SHIPPING_USPS_TYPES_INTL'); // EOF: UPS USPS } */ function keys($vendors_id) { // BOF: UPS USPS // ORIGINAL return array('MODULE_SHIPPING_USPS_STATUS', 'MODULE_SHIPPING_USPS_USERID', 'MODULE_SHIPPING_USPS_PASSWORD', 'MODULE_SHIPPING_USPS_SERVER', 'MODULE_SHIPPING_USPS_HANDLING', 'MODULE_SHIPPING_USPS_TAX_CLASS', 'MODULE_SHIPPING_USPS_ZONE', 'MODULE_SHIPPING_USPS_SORT_ORDER'); return array('MODULE_SHIPPING_USPS_STATUS_' . $vendors_id, 'MODULE_SHIPPING_USPS_USERID_' . $vendors_id, 'MODULE_SHIPPING_USPS_PASSWORD_' . $vendors_id, 'MODULE_SHIPPING_USPS_SERVER_' . $vendors_id, 'MODULE_SHIPPING_USPS_HANDLING_' . $vendors_id, 'MODULE_SHIPPING_USPS_TAX_CLASS_' . $vendors_id, 'MODULE_SHIPPING_USPS_ZONE_' . $vendors_id, 'MODULE_SHIPPING_USPS_SORT_ORDER_' . $vendors_id, 'MODULE_SHIPPING_USPS_OPTIONS_' . $vendors_id, 'MODULE_SHIPPING_USPS_TYPES_' . $vendors_id, 'MODULE_SHIPPING_USPS_TYPES_INTL_' . $vendors_id); // EOF: UPS USPS } // EOADD MVS function _setService($service) { $this->service = $service; } function _setWeight($pounds, $ounces=0) { $this->pounds = $pounds; $this->ounces = $ounces; } function _setContainer($container) { $this->container = $container; } function _setSize($size) { $this->size = $size; } function _setMachinable($machinable) { $this->machinable = $machinable; } function _getQuote($vendors_id) { // BOF: UPS USPS global $order, $transittime; // MVS Added $vendors_data_query = tep_db_query("select vendor_country, vendors_zipcode from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); // MVS End if(in_array('Display transit time', explode(', ', constant('MODULE_SHIPPING_USPS_OPTIONS_' . $vendors_id)))) $transit = TRUE; // EOF: UPS USPS if ($order->delivery['country']['id'] == /*SHIPPING_ORIGIN_COUNTRY*/ $vendors_data['vendor_country']) { $request = '<RateRequest USERID="' . constant('MODULE_SHIPPING_USPS_USERID_' . $vendors_id) . '" PASSWORD="' . constant('MODULE_SHIPPING_USPS_PASSWORD_' . $vendors_id) . '">'; $services_count = 0; if (isset($this->service)) { $this->types = array($this->service => $this->types[$this->service]); } $dest_zip = str_replace(' ', '', $order->delivery['postcode']); if ($order->delivery['country']['iso_code_2'] == 'US') $dest_zip = substr($dest_zip, 0, 5); reset($this->types); // BOF: UPS USPS $allowed_types = explode(", ", constant('MODULE_SHIPPING_USPS_TYPES_' . $vendors_id)); while (list($key, $value) = each($this->types)) { // BOF: UPS USPS if ( !in_array($key, $allowed_types) ) continue; $request .= '<Package ID="' . $services_count . '">' . '<Service>' . $key . '</Service>' . '<ZipOrigination>' . /*SHIPPING_ORIGIN_ZIP*/ $vendors_data['vendors_zipcode'] . '</ZipOrigination>' . '<ZipDestination>' . $dest_zip . '</ZipDestination>' . '<Pounds>' . $this->pounds . '</Pounds>' . '<Ounces>' . $this->ounces . '</Ounces>' . '<Container>' . $this->container . '</Container>' . '<Size>' . $this->size . '</Size>' . '<Machinable>' . $this->machinable . '</Machinable>' . '</Package>'; // BOF: UPS USPS if($transit){ $transitreq = 'USERID="' . constant('MODULE_SHIPPING_USPS_USERID_' . $vendors_id) . '" PASSWORD="' . constant('MODULE_SHIPPING_USPS_PASSWORD_' . $vendors_id) . '">' . '<OriginZip>' . $vendors_data['vendors_zipcode'] . '</OriginZip>' . '<DestinationZip>' . $dest_zip . '</DestinationZip>'; switch ($key) { case 'EXPRESS': $transreq[$key] = 'API=ExpressMail&XML=' . urlencode( '<ExpressMailRequest ' . $transitreq . '</ExpressMailRequest>'); break; case 'PRIORITY': $transreq[$key] = 'API=PriorityMail&XML=' . urlencode( '<PriorityMailRequest ' . $transitreq . '</PriorityMailRequest>'); break; case 'MEDIA': $transreq[$key] = 'API=MediaMail&XML=' . urlencode( '<MediaMailRequest ' . $transitreq . '</MediaMailRequest>'); break; case 'PARCEL': $transreq[$key] = 'API=StandardB&XML=' . urlencode( '<StandardBRequest ' . $transitreq . '</StandardBRequest>'); break; default: $transreq[$key] = ''; break; } } // EOF: UPS USPS $services_count++; } $request .= '</RateRequest>'; $request = 'API=Rate&XML=' . urlencode($request); } else { $request = '<IntlRateRequest USERID="' . constant('MODULE_SHIPPING_USPS_USERID_' . $vendors_id) . '" PASSWORD="' . constant('MODULE_SHIPPING_USPS_PASSWORD_' . $vendors_id) . '">' . '<Package ID="0">' . '<Pounds>' . $this->pounds . '</Pounds>' . '<Ounces>' . $this->ounces . '</Ounces>' . '<MailType>Package</MailType>' . '<Country>' . $this->countries[$order->delivery['country']['iso_code_2']] . '</Country>' . '</Package>' . '</IntlRateRequest>'; $request = 'API=IntlRate&XML=' . urlencode($request); } switch (constant('MODULE_SHIPPING_USPS_SERVER_' . $vendors_id)) { case 'production': $usps_server = 'production.shippingapis.com'; $api_dll = 'shippingapi.dll'; break; case 'test': default: $usps_server = 'testing.shippingapis.com'; $api_dll = 'ShippingAPITest.dll'; break; } $body = ''; $http = new httpClient(); if ($http->Connect($usps_server, 80)) { $http->addHeader('Host', $usps_server); $http->addHeader('User-Agent', 'osCommerce'); $http->addHeader('Connection', 'Close'); if ($http->Get('/' . $api_dll . '?' . $request)) $body = $http->getBody(); // BOF: UPS USPS // mail('[email protected]','USPS rate quote response',$body,'From: <[email protected]>'); if ($transit && is_array($transreq) && ($order->delivery['country']['id'] == STORE_COUNTRY)) { while (list($key, $value) = each($transreq)) { if ($http->Get('/' . $api_dll . '?' . $value)) $transresp[$key] = $http->getBody(); } } // EOF: UPS USPS $http->Disconnect(); } else { return false; } $response = array(); while (true) { if ($start = strpos($body, '<Package ID=')) { $body = substr($body, $start); $end = strpos($body, '</Package>'); $response[] = substr($body, 0, $end+10); $body = substr($body, $end+9); } else { break; } } $rates = array(); if ($order->delivery['country']['id'] == SHIPPING_ORIGIN_COUNTRY) { if (sizeof($response) == '1') { if (ereg('<Error>', $response[0])) { $number = ereg('<Number>(.*)</Number>', $response[0], $regs); $number = $regs[1]; $description = ereg('<Description>(.*)</Description>', $response[0], $regs); $description = $regs[1]; return array('error' => $number . ' -?' . $description); } } $n = sizeof($response); for ($i=0; $i<$n; $i++) { if (strpos($response[$i], '<Postage>')) { $service = ereg('<Service>(.*)</Service>', $response[$i], $regs); $service = $regs[1]; $postage = ereg('<Postage>(.*)</Postage>', $response[$i], $regs); $postage = $regs[1]; $rates[] = array($service => $postage); // BOF: UPS USPS if ($transit) { switch ($service) { case 'EXPRESS': $time = ereg('<MonFriCommitment>(.*)</MonFriCommitment>', $transresp[$service], $tregs); $time = $tregs[1]; if ($time == '' || $time == 'No Data') { $time = '1 - 2 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; } else { $time = 'Tomorrow by ' . $time; } break; case 'PRIORITY': $time = ereg('<Days>(.*)</Days>', $transresp[$service], $tregs); $time = $tregs[1]; if ($time == '' || $time == 'No Data') { $time = '2 - 3 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; } elseif ($time == '1') { $time .= ' ' . MODULE_SHIPPING_USPS_TEXT_DAY; } else { $time .= ' ' . MODULE_SHIPPING_USPS_TEXT_DAYS; } break; case 'MEDIA': $time = ereg('<Days>(.*)</Days>', $transresp[$service], $tregs); $time = $tregs[1]; if ($time == '' || $time == 'No Data') { $time = '4 - 7 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; } elseif ($time == '1') { $time .= ' ' . MODULE_SHIPPING_USPS_TEXT_DAY; } else { $time .= ' ' . MODULE_SHIPPING_USPS_TEXT_DAYS; } break; case 'PARCEL': $time = ereg('<Days>(.*)</Days>', $transresp[$service], $tregs); $time = $tregs[1]; if ($time == '' || $time == 'No Data') { $time = '4 - 15 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; } elseif ($time == '1') { $time .= ' ' . MODULE_SHIPPING_USPS_TEXT_DAY; } else { $time .= ' ' . MODULE_SHIPPING_USPS_TEXT_DAYS; } break; case 'FIRST CLASS': $time = '2 - 15 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; break; default: $time = '3 - 9' . MODULE_SHIPPING_USPS_TEXT_DAYS; break; } if ($time != '') $transittime[$service] = ' (' . $time . ')'; } // EOF: UPS USPS } } } else { if (ereg('<Error>', $response[0])) { $number = ereg('<Number>(.*)</Number>', $response[0], $regs); $number = $regs[1]; $description = ereg('<Description>(.*)</Description>', $response[0], $regs); $description = $regs[1]; return array('error' => $number . ' - ' . $description); } else { $body = $response[0]; $services = array(); while (true) { if ($start = strpos($body, '<Service ID=')) { $body = substr($body, $start); $end = strpos($body, '</Service>'); $services[] = substr($body, 0, $end+10); $body = substr($body, $end+9); } else { break; } } // BOF: UPS USPS $allowed_types = array(); foreach( explode(", ", constant('MODULE_SHIPPING_USPS_TYPES_INTL_' . $vendors_id)) as $value ) $allowed_types[$value] = $this->intl_types[$value]; // EOF: UPS USPS $size = sizeof($services); for ($i=0, $n=$size; $i<$n; $i++) { if (strpos($services[$i], '<Postage>')) { $service = ereg('<SvcDescription>(.*)</SvcDescription>', $services[$i], $regs); $service = $regs[1]; $postage = ereg('<Postage>(.*)</Postage>', $services[$i], $regs); $postage = $regs[1]; // BOF: UPS USPS $time = ereg('<SvcCommitments>(.*)</SvcCommitments>', $services[$i], $tregs); $time = $tregs[1]; $time = preg_replace('/Weeks$/', MODULE_SHIPPING_USPS_TEXT_WEEKS, $time); $time = preg_replace('/Days$/', MODULE_SHIPPING_USPS_TEXT_DAYS, $time); $time = preg_replace('/Day$/', MODULE_SHIPPING_USPS_TEXT_DAY, $time); if( !in_array($service, $allowed_types) ) continue; // EOF: UPS USPS if (isset($this->service) && ($service != $this->service) ) { continue; } $rates[] = array($service => $postage); // BOF: UPS USPS if ($time != '') $transittime[$service] = ' (' . $time . ')'; // EOF: UPS USPS } } } } return ((sizeof($rates) > 0) ? $rates : false); } function country_list() { $list = array('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AD' => 'Andorra', 'AO' => 'Angola', 'AI' => 'Anguilla', 'AG' => 'Antigua and Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia-Herzegovina', 'BW' => 'Botswana', 'BR' => 'Brazil', 'VG' => 'British Virgin Islands', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'MM' => 'Burma', 'BI' => 'Burundi', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY' => 'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CX' => 'Christmas Island (Australia)', 'CC' => 'Cocos Island (Australia)', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CG' => 'Congo (Brazzaville),Republic of the', 'ZR' => 'Congo, Democratic Republic of the', 'CK' => 'Cook Islands (New Zealand)', 'CR' => 'Costa Rica', 'CI' => 'Cote d\'Ivoire (Ivory Coast)', 'HR' => 'Croatia', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'TP' => 'East Timor (Indonesia)', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia', 'FK' => 'Falkland Islands', 'FO' => 'Faroe Islands', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'France', 'GF' => 'French Guiana', 'PF' => 'French Polynesia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia, Republic of', 'DE' => 'Germany', 'GH' => 'Ghana', 'GI' => 'Gibraltar', 'GB' => 'Great Britain and Northern Ireland', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' => 'Guadeloupe', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IL' => 'Israel', 'IT' => 'Italy', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libya', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macedonia, Republic of', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MQ' => 'Martinique', 'MR' => 'Mauritania', 'MU' => 'Mauritius', 'YT' => 'Mayotte (France)', 'MX' => 'Mexico', 'MD' => 'Moldova', 'MC' => 'Monaco (France)', 'MN' => 'Mongolia', 'MS' => 'Montserrat', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'KP' => 'North Korea (Korea, Democratic People\'s Republic of)', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PN' => 'Pitcairn Island', 'PL' => 'Poland', 'PT' => 'Portugal', 'QA' => 'Qatar', 'RE' => 'Reunion', 'RO' => 'Romania', 'RU' => 'Russia', 'RW' => 'Rwanda', 'SH' => 'Saint Helena', 'KN' => 'Saint Kitts (St. Christopher and Nevis)', 'LC' => 'Saint Lucia', 'PM' => 'Saint Pierre and Miquelon', 'VC' => 'Saint Vincent and the Grenadines', 'SM' => 'San Marino', 'ST' => 'Sao Tome and Principe', 'SA' => 'Saudi Arabia', 'SN' => 'Senegal', 'YU' => 'Serbia-Montenegro', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovak Republic', 'SI' => 'Slovenia', 'SB' => 'Solomon Islands', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'GS' => 'South Georgia (Falkland Islands)', 'KR' => 'South Korea (Korea, Republic of)', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syrian Arab Republic', 'TW' => 'Taiwan', 'TJ' => 'Tajikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TG' => 'Togo', 'TK' => 'Tokelau (Union) Group (Western Samoa)', 'TO' => 'Tonga', 'TT' => 'Trinidad and Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TC' => 'Turks and Caicos Islands', 'TV' => 'Tuvalu', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatican City', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'WF' => 'Wallis and Futuna Islands', 'WS' => 'Western Samoa', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe'); return $list; } } ?>
  7. Yes I modified the USPS to work with media mail. But I also have a lot of other modifications too! You are welcome to a copy of my file if you contact me. I know when I did it I looked for Parcel Post and duplicated everything related to Parcel Post substituting Media Mail instead.
  8. I had the same problerm. If I remember correctly it has nothing to do with ship_estimate.php. You need to add code from the readme in either the box or the shopping_cart.php (I call the estimator from a box only). Did you add the javascrript? You must access the page from the buuton on the shopping_cart.php or your box to have the close button function. Just navigating to the ship_estimate.php page won't allow you to use the close button as you never poped up to get the window. -Kendall
  9. I called USPS API dev people at (800) 344-7779. They claim that this is only happening to OSC customers. They claim that they are still sending tags in lowercase. Any way to verify this. They say that we changed something. If they are returning in lowercase then what is going on? The fix works. Besure to change or uninstall reinstall the module in admin to take effect (don't just edit the module).
  10. Jared, Thanks for your fix. I called USPS and they claim that they are still sending responses out in lowercase. They say that this was an OSC problem, we are converting it to UPPERCASE. Gee I don't know I didn't change anything prior to my customers being unwittingly duped into a higher priced service. IMHO they had to change something. Does anyone know how to verify (prove) if it is USPS or OSC? I'm giving refunds to my customers. Ouch! Sorry if this is a little off MVS topic.
  11. I'm having a problem with one of my installations of MVS. Reportedly the admin screen goes blank after a correct password is entered. I can't duplicate the error myself so in the meantime, while I figure out what is probably wrong on the clients own computer (from two thousand miles away!), I need a way to quickly and easily disable the admin side password system that is part of MVS. I've got the forder well protected with .htaccess in the meantime. Any Ideas? Thanks!
  12. I ran into a strange Fedex Bug that I believe also involves MVS. While checking shipping rates using the Fedex1.php module for a 14lb. package to Israel the Fedex1 module returned a rate of $1.00 for International Priority. I got this rate three times in a row (after refreshing). Then I started getting "No Rates Returned :" message. After awhile Fedex started returning the correct amount $210.16. It appears Fedex was having problems and was returning a rate of $0.00 and as I have The "Vendor's handling charge:" set to $1.00 it somehow missed the error checking of the Fedex1 module as the rate was no longer $0.00 but $1.00. I have not been able to duplicate the error since, as Fedex seems to be returning correct data and I don't know how to fake the Fedex result. And I can't be sure that my code (other than Fedex1.php which was untouched) somewhere else did not contribute to the problem. Anyway, I hacked a fix (I think) that should prevent it from happening again. Here it is (just one line) for /includdes/modules/vendors_shipping/fedex1.php: BEGIN CODE SNIP========= if ($method) { if (substr($type,0,2) != $method) $skip = TRUE; } // Begin Low or No Quote Fix by KQM if($cost < '5.00') $skip = TRUE; // End Low or No Quote Fix by KQM if (!$skip) { $methods[] = array('id' => substr($type,0,2), 'title' => $service_descr, 'cost' => ($handling + $shipping + constant('MODULE_SHIPPING_FEDEX1_SURCHARGE_' . $vendors_id) + $this->surcharge + $cost) * $shipping_num_boxes); END CODE SNIP========= It would be smarter if I knew what I was doing and made my $5.00 minumum be equal to whatever the "Vendor's handling charge:" is but I couldn't figure it out. Dumb and Lazy too...
  13. I think that the Multi Vendor Shipping Module would work best for you. With that contribution you can setup DVDs as one vendor and then Books as another. Then you can assign any specific shipping module to each vendor. When you setup a procuct you assign it to a vendor (i.e. Books) then when someone buys books it appys the shipping rules for Books to all the Books sold. If you sell a combinatiion of Books and DVD's in the same order It woud calculate it as two different shipments though. That may or may not work for you. Good Luck!
  14. It is a set of instruction s that makes changes to your MySQL database. You can execute these instructions in one of three ways (that I will list). 1). You can use the command line to access MySQL and run the instructions. 2). Recommended! Use a free (to you probably) helper application like phpMyAdmin (ask your hosting company maybe it is installed already). 3). Use a non-free (to use) application like Navicat (which I love and use but unless you are passionate it is not needed!). Hope this helps get you going. There are likely many turirials on how to use any one of these to execute an MySQL batch file.
  15. I was unable to fix that same problem so I had to uninstall this contribution. Seems like I've heard a lot about people having this installed on their carts and I can't imagine that so many would put up with such a bug. I really need this kind of functionality so I'm hoping some kind person can help fix it. I tried but I'm just learning php... Hope someone can help out. I would be eternally grateful!
×
×
  • Create New...