osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 11-19-2002, 01:37 AM
Anonymous
Guest
 
Posts: n/a
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 11-23-2002, 07:43 AM
Active Member
 
Join Date: Oct 2002
Location: Arkansas
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
modom
Default

Hi,

You need to change this in the admin area.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 11-23-2002, 09:47 AM
Lurker
 
Join Date: Nov 2002
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
someguy
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 11-23-2002, 10:45 AM
Active Member
 
Join Date: Oct 2002
Location: Arkansas
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
modom
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 11-23-2002, 11:14 AM
Active Member
 
Join Date: Oct 2002
Location: Arkansas
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
modom
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 11-23-2002, 12:57 PM
Anonymous
Guest
 
Posts: n/a
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 11-26-2002, 02:26 PM
Member
 
Join Date: Oct 2002
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
stan
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",)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 11-26-2002, 02:29 PM
Member
 
Join Date: Oct 2002
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
stan
Default

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

-- stan c",)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9  
Old 11-27-2002, 07:04 AM
Active Member
 
Join Date: Oct 2002
Location: Arkansas
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
modom
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #10  
Old 11-27-2002, 10:51 AM
Member
 
Join Date: Oct 2002
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
stan
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Shipping module problem HollyRidge osCMax v2 Installation issues 3 02-20-2006 04:03 PM
Shipping Module chitta_rn osCMax v2 Customization/Mods 0 07-17-2005 04:04 AM
new shipping module ? ratherkool osCMax v1.7 General Mods Discussion 0 01-12-2005 10:21 PM
USPS shipping module. pahalik osCommerce 2.2 Modification Help 4 01-02-2005 01:38 AM
Complex Shipping Module. raveoverseas osCommerce 2.2 Modification Help 0 05-07-2003 07:35 PM


All times are GMT -8. The time now is 06:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax