Page 1 of 2 12 LastLast
Results 1 to 10 of 11

UPS shipping module

This is a discussion on UPS shipping module within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; During testing (shipping to myself) I get the following options: Ground Residential Next Day Air Early AM Next Day Air ...

      
  1. #1
    Anonymous
    Guest


    Default UPS shipping module

    During testing (shipping to myself) I get the following options:
    Ground Residential
    Next Day Air Early AM
    Next Day Air
    Next Day Air Saver
    2nd Day Air
    3 Day Select
    3 Day Select
    Ground Commercial

    is there a way to have it only show:
    2nd Day Air
    Ground

    and to places out of the country just show:
    2nd Day Air

    or something along those lines?

  2. #2
    Active Member
    Join Date
    Oct 2002
    Location
    Arkansas
    Posts
    149
    Rep Power
    0


    Default

    Hi,

    You need to change this in the admin area.
    Sincerely,
    Melinda

    www.designhosting.biz

  3. #3
    Lurker
    Join Date
    Nov 2002
    Posts
    3
    Rep Power
    0


    Default

    where can that be changed in the admin area? im looking in modules/shipping and only have these options

    Enable UPS Shipping
    1

    UPS Pickup Method
    CC

    UPS Packaging?
    CP

    Residential Delivery?
    RES

  4. #4
    Active Member
    Join Date
    Oct 2002
    Location
    Arkansas
    Posts
    149
    Rep Power
    0


    Default

    Hi,

    I'm sorry but I misunderstood your question before.

    Maybe you could comment out some of these in one of the files.

    I will look around and see if I can find out how to do this or if it is possible.
    Sincerely,
    Melinda

    www.designhosting.biz

  5. #5
    Active Member
    Join Date
    Oct 2002
    Location
    Arkansas
    Posts
    149
    Rep Power
    0


    Default

    Hi,

    You can get rid of the names in catalog/includes/modules/shipping/ups.php by commenting out this code:

    //'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',
    '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');

    Notice that I put the ending ); tag after Ground Residential listing.

    I haven't figured out how to get rid of the amounts or the radio buttons for the commented out listings.
    Sincerely,
    Melinda

    www.designhosting.biz

  6. #6
    Anonymous
    Guest


    Default UPS options

    if you figure out how to eliminate those from showing up even tho they are commented out please let me know how to do it!!!

    thanks!

    looker@fwdepot.com

  7. #7
    Member
    Join Date
    Oct 2002
    Posts
    40
    Rep Power
    0


    Default

    You just need to wrap the code in the quote() method to only add the method if it is supported. It's around line 76 of catalog/includes/modules/shipping/ups.php.

    Change:

    list($type, $cost) = each($upsQuote[$i]);
    $methods[] = array('id' => $type,
    'title' => $this->types[$type],
    'cost' => (SHIPPING_HANDLING + $cost) * $shipping_num_boxes);

    To:
    list($type, $cost) = each($upsQuote[$i]);
    if( isset($this->types[$type]) )
    {
    $methods[] = array('id' => $type,
    'title' => $this->types[$type],
    'cost' => (SHIPPING_HANDLING + $cost) * $shipping_num_boxes);
    }

    I don't see why this check shouldn't be made part of the normal distribution imho...

    hth,
    -- stan c",)

  8. #8
    Member
    Join Date
    Oct 2002
    Posts
    40
    Rep Power
    0


    Default

    Hmm... as a side note, I really like the latest changes in the shipping stuff. It looks much nicer! Thanks, Harald!

    -- stan c",)

  9. #9
    Active Member
    Join Date
    Oct 2002
    Location
    Arkansas
    Posts
    149
    Rep Power
    0


    Default

    Hi,

    There was a parse error.

    The code should be changed to:

    list($type, $cost) = each($upsQuote[$i]);
    if( isset($this->types[$type]) )
    $methods[] = array('id' => $type,
    'title' => $this->types[$type],
    'cost' => (SHIPPING_HANDLING + $cost) * $shipping_num_boxes);
    }

    It works great!
    Sincerely,
    Melinda

    www.designhosting.biz

  10. #10
    Member
    Join Date
    Oct 2002
    Posts
    40
    Rep Power
    0


    Default

    i had myself confused for awhile there! i thought i was missing the opening curly brace! But I checked and figured out the real misunderstanding: I cut & pasted just the inside of the for-loop, which just so happens to end right after my original snippet. I'm guessing that people are mixing up my ending curly with the ending curly for the for-loop.

    Here's an expanded snippet that hopefully clears it up. The other way works too, but is trickier cuz the if will only evaluate the next statement -- I prefer explicit blocks, but hey, it's just a style thang!

    Expanded snippet to follow:
    Code:
            for ($i=0; $i<sizeof($upsQuote); $i++) {
              list($type, $cost) = each($upsQuote[$i]);
              if( isset($this->types[$type]) )
              {
                $methods[] = array('id' => $type,
                                   'title' => $this->types[$type],
                                   'cost' => (SHIPPING_HANDLING + $cost) * $shipping_num_boxes);
              }
            }
    mystery solved! whew!

    -- stan c",)

    p.s. humph! i noticed something else sucky... i haven't been marking my code snippets with the proper tags, so all my spaces/tabs were just being munched because it was just normal html. doh!

    oth, it's almost thanksgiving! yay! i'm counting down the hours.

Page 1 of 2 12 LastLast

Similar Threads

  1. Shipping module problem
    By HollyRidge in forum osCmax v2 Installation issues
    Replies: 3
    Last Post: 02-20-2006, 04:03 PM
  2. Shipping Module
    By chitta_rn in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 07-17-2005, 05:04 AM
  3. new shipping module ?
    By ratherkool in forum osCMax v1.7 General Mods Discussion
    Replies: 0
    Last Post: 01-12-2005, 10:21 PM
  4. USPS shipping module.
    By pahalik in forum osCommerce 2.2 Modification Help
    Replies: 4
    Last Post: 01-02-2005, 01:38 AM
  5. Complex Shipping Module.
    By raveoverseas in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 05-07-2003, 08:35 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
  •