Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Error cloning a shipping module

    Where are you shipping from?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  2. #12
    Join Date
    Sep 2006
    Posts
    42
    Plugin Contributions
    0

    Default Re: Error cloning a shipping module

    Shipping from a Maryland zip code - 20878 for test purposes

  3. #13
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Error cloning a shipping module

    UPS gets the Real Time quotes ... there are no rates to enter ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #14
    Join Date
    Sep 2006
    Posts
    42
    Plugin Contributions
    0

    Default Re: Error cloning a shipping module

    OK, now it's getting weird...

    I decided to enable flat-rate shipping for testing purposes (this is not on a live site).

    I set ups and upscanada to enabled=false.

    I set MZMT on. I enabled zone 1 with shipping based on price, & zone2 as well. Both zones are identical with the following exceptions:

    Zone1 = Shp: US

    Zone2= Shp:CA and has a $10 handling fee.

    I have price tables for the zones.

    I update the MZMT. I get the orange dot (circle) next to it (if I switch those shipping zones to none or "the rest of the world" I get a green circle instead of the yellow one).

    IOW, I am using the 2 pre-defined shipping zones that were/are "breaking" the UPS and UPS Canada modules.

    So I put some free test items in my cart. I click on estimate shipping.

    That window pops up and is interesting:

    Warning: constant() [function.constant]: Couldn't find constant MODULE_SHIPPING_MZMT_GEOZONE_1_TABLE_4_TEXT_WAY in C:\Program Files\xampp\htdocs\connequestrian\store\includes\modules\shipping\mzmt.php on line 125

    (I haven't really looked into the error yet)

    Then below it I have my shipping table. The options shown are

    Flat Rate (Best Way) - $35.00
    United Parcel Service (UPS) (Ground) - $9.95
    United Parcel Service (UPS) (Second Day) - $14.95
    United Parcel Service (UPS) (Next Day) - $17.95
    United Parcel Service (UPS) () - $22.95


    WHAT?!?

    OK, my UPS modules are turned OFF. MZMT, as far as I know, has no way of knowing what these rates are. These numbers MUST be coming from the ups module, but it is set to enabled=false!!!!! When I turn it on, I get nothing in this estimator!

    That being said, why is the last option (3 day shipping) showing as "()" unlike the others?

    The $$ amounts are all correct.

    I also have the sort order for flat rate to 3 and ups is 1

    Why is it (ALWAYS) showing the Flat-Rate as "Best Way" when it is obviously not?

    So what exactly is going on here? It looks like shipping has just gone haywire!!!

    BTW, running latest (1.3.5?) of ZenCart if that makes any difference.

    This is just nuts.

    And is there anyway to change the look & feel (other than stylesheets) for these pages? The reason I ask is that I would like to, per page, change the style name.

    For example, if the "Home" link text on the shipping page is class="homeLink" and I use a style sheet to place it elsewhere on the page, it is very likely that on the checkout page, the same link has the same class. What if on the checkout page I want to place it somewhere else? I would like to do something like

    class="shippingHomeLink" for the shipping page and
    class="checkoutHomeLink" for the checkout page

    What if I want to change that text to an image (button)?

    Anyway, I'm hijacking my own thread!

    Thanks,

    Brain21

  5. #15
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Error cloning a shipping module

    Each shipping module has a matching language module ...

    You can edit that to anything you want it to read ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #16
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Error cloning a shipping module

    /includes/modules/shipping/ups.php is also being changed to prevent the weight from being altered and to ensure at least .1 is sent to UPS for a quote ...

    Use this code and see if it helps with conflicts on your shipping weights:
    PHP Code:
    <?php
    /**
     * @package shippingMethod
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: ups.php 4633 2006-09-30 14:53:59Z ajeh $
     */
    /**
     * Enter description here...
     *
     */
    class ups extends base {
      
    /**
       * Enter description here...
       *
       * @var unknown_type
       */
      
    var $code;
      
    /**
       * Enter description here...
       *
       * @var unknown_type
       */
      
    var $title;
      
    /**
       * Enter description here...
       *
       * @var unknown_type
       */
      
    var $description;
      
    /**
       * Enter description here...
       *
       * @var unknown_type
       */
      
    var $icon;
      
    /**
       * Enter description here...
       *
       * @var unknown_type
       */
      
    var $enabled;
      
    /**
       * Enter description here...
       *
       * @var unknown_type
       */
      
    var $types;
      
    /**
       * Enter description here...
       *
       * @return ups
       */
      
    function ups() {
        global 
    $order$db$template;

        
    $this->code 'ups';
        
    $this->title MODULE_SHIPPING_UPS_TEXT_TITLE;
        
    $this->description MODULE_SHIPPING_UPS_TEXT_DESCRIPTION;
        
    $this->sort_order MODULE_SHIPPING_UPS_SORT_ORDER;
        
    $this->icon $template->get_template_dir('shipping_ups.gif'DIR_WS_TEMPLATE$current_page_base,'images/icons'). '/' 'shipping_ups.gif';
        
    $this->tax_class MODULE_SHIPPING_UPS_TAX_CLASS;
        
    $this->tax_basis MODULE_SHIPPING_UPS_TAX_BASIS;

        
    // disable only when entire cart is free shipping
        
    if (zen_get_shipping_enabled($this->code)) {
          
    $this->enabled = ((MODULE_SHIPPING_UPS_STATUS == 'True') ? true false);
        }

        if ( (
    $this->enabled == true) && ((int)MODULE_SHIPPING_UPS_ZONE 0) ) {
          
    $check_flag false;
          
    $check $db->Execute("select zone_id from " TABLE_ZONES_TO_GEO_ZONES " where geo_zone_id = '" MODULE_SHIPPING_UPS_ZONE "' and zone_country_id = '" $order->delivery['country']['id'] . "' order by zone_id");
          while (!
    $check->EOF) {
            if (
    $check->fields['zone_id'] < 1) {
              
    $check_flag true;
              break;
            } elseif (
    $check->fields['zone_id'] == $order->delivery['zone_id']) {
              
    $check_flag true;
              break;
            }
            
    $check->MoveNext();
          }

          if (
    $check_flag == false) {
            
    $this->enabled false;
          }
        }

        
    $this->types = array('1DM' => 'Next Day Air Early AM',
        
    '1DML' => 'Next Day Air Early AM Letter',
        
    '1DA' => 'Next Day Air',
        
    '1DAL' => 'Next Day Air Letter',
        
    '1DAPI' => 'Next Day Air Intra (Puerto Rico)',
        
    '1DP' => 'Next Day Air Saver',
        
    '1DPL' => 'Next Day Air Saver Letter',
        
    '2DM' => '2nd Day Air AM',
        
    '2DML' => '2nd Day Air AM Letter',
        
    '2DA' => '2nd Day Air',
        
    '2DAL' => '2nd Day Air Letter',
        
    '3DS' => '3 Day Select',
        
    'GND' => 'Ground',
        
    'GNDCOM' => 'Ground Commercial',
        
    'GNDRES' => 'Ground Residential',
        
    'STD' => 'Canada Standard',
        
    'XPR' => 'Worldwide Express',
        
    'XPRL' => 'worldwide Express Letter',
        
    'XDM' => 'Worldwide Express Plus',
        
    'XDML' => 'Worldwide Express Plus Letter',
        
    'XPD' => 'Worldwide Expedited');
      }
      
    /**
       * Enter description here...
       *
       * @param unknown_type $method
       * @return unknown
       */
      
    function quote($method '') {
        global 
    $_POST$order$shipping_weight$shipping_num_boxes;

        if ( (
    zen_not_null($method)) && (isset($this->types[$method])) ) {
          
    $prod $method;
          
    // BOF: UPS USPS
        
    } else if ($order->delivery['country']['iso_code_2'] == 'CA') {
          
    $prod 'STD';
          
    // EOF: UPS USPS
        
    } else {
          
    $prod 'GNDRES';
        }

        if (
    $method$this->_upsAction('3'); // return a single quote

        
    $this->_upsProduct($prod);

        
    $ups_shipping_weight = ($shipping_weight 0.1 0.1 $shipping_weight);

        
    $country_name zen_get_countries(SHIPPING_ORIGIN_COUNTRYtrue);
        
    $this->_upsOrigin(SHIPPING_ORIGIN_ZIP$country_name['countries_iso_code_2']);
        
    $this->_upsDest($order->delivery['postcode'], $order->delivery['country']['iso_code_2']);
        
    $this->_upsRate(MODULE_SHIPPING_UPS_PICKUP);
        
    $this->_upsContainer(MODULE_SHIPPING_UPS_PACKAGE);
        
    $this->_upsWeight($ups_shipping_weight);
        
    $this->_upsRescom(MODULE_SHIPPING_UPS_RES);
        
    $upsQuote $this->_upsGetQuote();

        if ( (
    is_array($upsQuote)) && (sizeof($upsQuote) > 0) ) {
          switch (
    SHIPPING_BOX_WEIGHT_DISPLAY) {
            case (
    0):
            
    $show_box_weight '';
            break;
            case (
    1):
            
    $show_box_weight ' (' $shipping_num_boxes ' ' TEXT_SHIPPING_BOXES ')';
            break;
            case (
    2):
            
    $show_box_weight ' (' number_format($ups_shipping_weight $shipping_num_boxes,2) . TEXT_SHIPPING_WEIGHT ')';
            break;
            default:
            
    $show_box_weight ' (' $shipping_num_boxes ' x ' number_format($ups_shipping_weight,2) . TEXT_SHIPPING_WEIGHT ')';
            break;
          }
          
    $this->quotes = array('id' => $this->code,
          
    'module' => $this->title $show_box_weight);

          
    $methods = array();
          
    // BOF: UPS USPS
          
    $allowed_methods explode(", "MODULE_SHIPPING_UPS_TYPES);
          
    $std_rcd false;
          
    // EOF: UPS USPS
          
    $qsize sizeof($upsQuote);
          for (
    $i=0$i<$qsize$i++) {
            list(
    $type$cost) = each($upsQuote[$i]);
            
    // BOF: UPS USPS
            
    if ($type=='STD') {
              if (
    $std_rcd) continue;
              else 
    $std_rcd true;
            }
            if (!
    in_array($type$allowed_methods)) continue;
            
    // EOF: UPS USPS
            
    $methods[] = array('id' => $type,
            
    'title' => $this->types[$type],
            
    'cost' => ($cost MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
          }

          
    $this->quotes['methods'] = $methods;

          if (
    $this->tax_class 0) {
            
    $this->quotes['tax'] = zen_get_tax_rate($this->tax_class$order->delivery['country']['id'], $order->delivery['zone_id']);
          }
        } else {
          
    /* ORIGINAL
          $this->quotes = array('module' => $this->title,
          'error' => 'An error occurred with the UPS shipping calculations.<br />' . $upsQuote . '<br />If you prefer to use UPS as your shipping method, please contact the store owner.');
          */
          // BOF: UPS USPS
          
    $this->quotes = array('module' => $this->title,
          
    'error' => 'We are unable to obtain a rate quote for UPS shipping.<br />Please contact the store if no other alternative is shown.');
          
    // EOF: UPS USPS
        
    }

        if (
    zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon$this->title);

        return 
    $this->quotes;
      }
      
    /**
       * Enter description here...
       *
       * @return unknown
       */
      
    function check() {
        global 
    $db;
        if (!isset(
    $this->_check)) {
          
    $check_query $db->Execute("select configuration_value from " TABLE_CONFIGURATION " where configuration_key = 'MODULE_SHIPPING_UPS_STATUS'");
          
    $this->_check $check_query->RecordCount();
        }
        return 
    $this->_check;
      }
      
    /**
       * Enter description here...
       *
       */
      
    function install() {
        global 
    $db;
        
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable UPS Shipping', 'MODULE_SHIPPING_UPS_STATUS', 'True', 'Do you want to offer UPS shipping?', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
        
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('UPS Pickup Method', 'MODULE_SHIPPING_UPS_PICKUP', 'CC', 'How do you give packages to UPS? CC - Customer Counter, RDP - Daily Pickup, OTP - One Time Pickup, LC - Letter Center, OCA - On Call Air', '6', '0', now())");
        
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('UPS Packaging?', 'MODULE_SHIPPING_UPS_PACKAGE', 'CP', 'CP - Your Packaging, ULE - UPS Letter, UT - UPS Tube, UBE - UPS Express Box', '6', '0', now())");
        
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Residential Delivery?', 'MODULE_SHIPPING_UPS_RES', 'RES', 'Quote for Residential (RES) or Commercial Delivery (COM)', '6', '0', now())");
        
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_UPS_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())");
        
    $db->Execute("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_UPS_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())");
        
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Tax Basis', 'MODULE_SHIPPING_UPS_TAX_BASIS', 'Shipping', 'On what basis is Shipping Tax calculated. Options are<br />Shipping - Based on customers Shipping Address<br />Billing Based on customers Billing address<br />Store - Based on Store address if Billing/Shipping Zone equals Store zone', '6', '0', 'zen_cfg_select_option(array(\'Shipping\', \'Billing\', \'Store\'), ', now())");
        
    $db->Execute("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_UPS_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
        
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_SHIPPING_UPS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
        
    // BOF: UPS USPS
        //      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ( 'Shipping Methods', 'MODULE_SHIPPING_UPS_TYPES', 'Nxt AM,Nxt AM Ltr,Nxt,Nxt Ltr,Nxt PR,Nxt Save,Nxt Save Ltr,2nd AM,2nd AM Ltr,2nd,2nd Ltr,3 Day Select,Ground,Canada,World Xp,World Xp Ltr, World Xp Plus,World Xp Plus Ltr,World Expedite', 'Select the USPS services to be offered.', '6', '13', 'zen_cfg_select_multioption(array(\'1DM\',\'1DML\', \'1DA\', \'1DAL\', \'1DAPI\', \'1DP\', \'1DPL\', \'2DM\', \'2DML\', \'2DA\', \'2DAL\', \'3DS\',\'GND\', \'STD\', \'XPR\', \'XPRL\', \'XDM\', \'XDML\', \'XPD\'), ', now() )");
        
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ( 'Shipping Methods: <br />Nxt AM, Nxt AM Ltr, Nxt, Nxt Ltr, Nxt PR, Nxt Save, Nxt Save Ltr, 2nd AM, 2nd AM Ltr, 2nd, 2nd Ltr, 3 Day Select, Ground, Canada,World Xp, World Xp Ltr, World Xp Plus, World Xp Plus Ltr, World Expedite', 'MODULE_SHIPPING_UPS_TYPES', '1DM, 1DML, 1DA, 1DAL, 1DAPI, 1DP, 1DPL, 2DM, 2DML, 2DA, 2DAL, 3DS, GND, STD, XPR, XPRL, XDM, XDML, XPD', 'Select the UPS services to be offered.', '6', '13', 'zen_cfg_select_multioption(array(\'1DM\',\'1DML\', \'1DA\', \'1DAL\', \'1DAPI\', \'1DP\', \'1DPL\', \'2DM\', \'2DML\', \'2DA\', \'2DAL\', \'3DS\',\'GND\', \'STD\', \'XPR\', \'XPRL\', \'XDM\', \'XDML\', \'XPD\'), ', now() )");
        
    // EOF: UPS USPS
      
    }
      
    /**
       * Enter description here...
       *
       */
      
    function remove() {
        global 
    $db;
        
    $db->Execute("delete from " TABLE_CONFIGURATION " where configuration_key in ('" implode("', '"$this->keys()) . "')");
      }
      
    /**
       * Enter description here...
       *
       * @return unknown
       */
      
    function keys() {
        return array(
    'MODULE_SHIPPING_UPS_STATUS''MODULE_SHIPPING_UPS_PICKUP''MODULE_SHIPPING_UPS_PACKAGE''MODULE_SHIPPING_UPS_RES''MODULE_SHIPPING_UPS_HANDLING''MODULE_SHIPPING_UPS_TAX_CLASS''MODULE_SHIPPING_UPS_TAX_BASIS''MODULE_SHIPPING_UPS_ZONE''MODULE_SHIPPING_UPS_SORT_ORDER''MODULE_SHIPPING_UPS_TYPES');
      }
      
    /**
       * Enter description here...
       *
       * @param unknown_type $prod
       */
      
    function _upsProduct($prod){
        
    $this->_upsProductCode $prod;
      }
      
    /**
       * Enter description here...
       *
       * @param unknown_type $postal
       * @param unknown_type $country
       */
      
    function _upsOrigin($postal$country){
        
    $this->_upsOriginPostalCode $postal;
        
    $this->_upsOriginCountryCode $country;
      }
      
    /**
       * Enter description here...
       *
       * @param unknown_type $postal
       * @param unknown_type $country
       */
      
    function _upsDest($postal$country){
        
    $postal str_replace(' '''$postal);

        if (
    $country == 'US') {
          
    $this->_upsDestPostalCode substr($postal05);
        } else {
          
    $this->_upsDestPostalCode $postal;
        }

        
    $this->_upsDestCountryCode $country;
      }
      
    /**
       * Enter description here...
       *
       * @param unknown_type $foo
       */
      
    function _upsRate($foo) {
        switch (
    $foo) {
          case 
    'RDP':
          
    $this->_upsRateCode 'Regular+Daily+Pickup';
          break;
          case 
    'OCA':
          
    $this->_upsRateCode 'On+Call+Air';
          break;
          case 
    'OTP':
          
    $this->_upsRateCode 'One+Time+Pickup';
          break;
          case 
    'LC':
          
    $this->_upsRateCode 'Letter+Center';
          break;
          case 
    'CC':
          
    $this->_upsRateCode 'Customer+Counter';
          break;
        }
      }
      
    /**
       * Enter description here...
       *
       * @param unknown_type $foo
       */
      
    function _upsContainer($foo) {
        switch (
    $foo) {
          case 
    'CP'// Customer Packaging
          
    $this->_upsContainerCode '00';
          break;
          case 
    'ULE'// UPS Letter Envelope
          
    $this->_upsContainerCode '01';
          break;
          case 
    'UT'// UPS Tube
          
    $this->_upsContainerCode '03';
          break;
          case 
    'UEB'// UPS Express Box
          
    $this->_upsContainerCode '21';
          break;
          case 
    'UW25'// UPS Worldwide 25 kilo
          
    $this->_upsContainerCode '24';
          break;
          case 
    'UW10'// UPS Worldwide 10 kilo
          
    $this->_upsContainerCode '25';
          break;
        }
      }
      
    /**
       * Enter description here...
       *
       * @param unknown_type $foo
       */
      
    function _upsWeight($foo) {
        
    $this->_upsPackageWeight $foo;
      }
      
    /**
       * Enter description here...
       *
       * @param unknown_type $foo
       */
      
    function _upsRescom($foo) {
        switch (
    $foo) {
          case 
    'RES'// Residential Address
          
    $this->_upsResComCode '1';
          break;
          case 
    'COM'// Commercial Address
          
    $this->_upsResComCode '0';
          break;
        }
      }
      
    /**
       * Enter description here...
       *
       * @param unknown_type $action
       */
      
    function _upsAction($action) {
        
    /* 3 - Single Quote
        4 - All Available Quotes */

        
    $this->_upsActionCode $action;
      }
      
    /**
       * Enter description here...
       *
       * @return unknown
       */
      
    function _upsGetQuote() {
        if (!isset(
    $this->_upsActionCode)) $this->_upsActionCode '4';

        
    $request join('&', array('accept_UPS_license_agreement=yes',
        
    '10_action=' $this->_upsActionCode,
        
    '13_product=' $this->_upsProductCode,
        
    '14_origCountry=' $this->_upsOriginCountryCode,
        
    '15_origPostal=' $this->_upsOriginPostalCode,
        
    '19_destPostal=' $this->_upsDestPostalCode,
        
    '22_destCountry=' $this->_upsDestCountryCode,
        
    '23_weight=' $this->_upsPackageWeight,
        
    '47_rate_chart=' $this->_upsRateCode,
        
    '48_container=' $this->_upsContainerCode,
        
    '49_residential=' $this->_upsResComCode));
        
    $http = new httpClient();
        if (
    $http->Connect('www.ups.com'80)) {
          
    $http->addHeader('Host''www.ups.com');
          
    $http->addHeader('User-Agent''Zen Cart');
          
    $http->addHeader('Connection''Close');

          if (
    $http->Get('/using/services/rave/qcostcgi.cgi?' $request)) $body $http->getBody();

          
    $http->Disconnect();
        } else {
          return 
    'error';
        }

        
    // BOF: UPS USPS
        /*
        TEST by checking out in the catalog; try a variety of shipping destinations to be sure
        your customers will be properly served.  If you are not getting any quotes, try enabling
        more alternatives in admin. Make sure your store's postal code is set in Admin ->
        Configuration -> Shipping/Packaging, since you won't get any quotes unless there is
        a origin that UPS recognizes.

        If you STILL don't get any quotes, here is a way to find out exactly what UPS is sending
        back in response to rate quote request.  At line 278, you will find this statement in a
        comment block:

        mail('[email protected]','UPS response',$body,'From: <[email protected]>');
        */
        // EOF: UPS USPS

        
    $body_array explode("\n"$body);

        
    $returnval = array();
        
    $errorret 'error'// only return error if NO rates returned

        
    $n sizeof($body_array);
        for (
    $i=0$i<$n$i++) {
          
    $result explode('%'$body_array[$i]);
    //print_r($result);
    //die();
          
    $errcode substr($result[0], -1);
          switch (
    $errcode) {
            case 
    3:
            if (
    is_array($returnval)) $returnval[] = array($result[1] => $result[8]);
            break;
            case 
    4:
            if (
    is_array($returnval)) $returnval[] = array($result[1] => $result[8]);
            break;
            case 
    5:
            
    $errorret $result[1];
            break;
            case 
    6:
            if (
    is_array($returnval)) $returnval[] = array($result[3] => $result[10]);
            break;
          }
        }
        if (empty(
    $returnval)) $returnval $errorret;

        return 
    $returnval;
      }
    }
    ?>
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #17
    Join Date
    Sep 2006
    Posts
    42
    Plugin Contributions
    0

    Default Re: Error cloning a shipping module

    OK, I'm not using weight for the delimeter for shipping. I'm using price.

    However, I looked at the MZMT.php module in the languages/english directory.

    AHA! So, UPS *is* turned off. In the English module for MZMT it shows (I didn't enter this info in, so I'm not positive how it got there) the following:

    define('MODULE_SHIPPING_MZMT_GEOZONE_1_TEXT_TITLE', 'United Parcel Service (UPS)');
    define('MODULE_SHIPPING_MZMT_GEOZONE_1_ICON', 'shipping_ups.gif');
    define('MODULE_SHIPPING_MZMT_GEOZONE_1_TABLE_1_TEXT_WAY', 'Ground');
    define('MODULE_SHIPPING_MZMT_GEOZONE_1_TABLE_2_TEXT_WAY', 'Second Day');
    define('MODULE_SHIPPING_MZMT_GEOZONE_1_TABLE_3_TEXT_WAY', 'Next Day');

    There should be *4* entreis there as that is what I put in in the module under admin. So I can just add it, and put in 3 day, and that will fix the "90" problem

    For the GEOZONE_2 stuff, the text is all blank. So I fix that by adding in the text (UPS to Canada) and that should fix it all.

    I still don't understand why I have the yellow circle next to the MZMT module, yet it is enabled... and why does MZMT apparently work w/ a yellow circle next to it and UPS doesn't?

    Thanks for pointing me in the right direction!

    Brain21

  8. #18
    Join Date
    Sep 2006
    Posts
    42
    Plugin Contributions
    0

    Default Re: Error cloning a shipping module

    OK, this seems to have fixed everything. Looks like some sort of bug in MZMT.

    I also noticed that the sort order for the shipping modules was off. I had flat-rate shipping as 3 and MZMT as 0. Flat rate was at the top of the list. I switched MZMT from a sort orcer of 0 to 1 and now MZMT shows up first.

    Ran through the checkout procedure and it all seems working!

    Thanks for all the help!

    Brain21

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Shipping module cloning
    By jmp04 in forum Built-in Shipping and Payment Modules
    Replies: 21
    Last Post: 11 Dec 2010, 02:36 PM
  2. Cloning USPS Shipping Module
    By elgrcg in forum Addon Shipping Modules
    Replies: 3
    Last Post: 3 Dec 2010, 10:52 PM
  3. Cloning the Flat Rate Shipping Module
    By jo_h1971 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 16 Oct 2009, 12:11 PM
  4. cloning the shipping module - table
    By drmad in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 20 Oct 2006, 08:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR