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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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
| |||
| |||
| Hi, You need to change this in the admin area. |
|
#3
| |||
| |||
| 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
| |||
| |||
| 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. |
|
#5
| |||
| |||
| 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. |
|
#6
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| Hmm... as a side note, I really like the latest changes in the shipping stuff. It looks much nicer! Thanks, Harald! -- stan c",) |
|
#9
| |||
| |||
| 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! |
|
#10
| |||
| |||
| i had myself confused for awhile there! i thought i was missing the opening curly brace! 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);
}
} -- 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. |
| Thread Tools | |
| |
| ||||
| 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 |