I am looking to add FedEx SmartPost as a shipping option. Any idea what I need to do to accomplish this? The only information I have found on it is here https://drupal.org/node/793124, but it seems no one has solved this issue. I am willing to modify the ubercart fedex module if needed.
So far what I have done:
RateService_v10.wsdl
to RateService_v14.wsdl
Added code to the uc_fedex_rate_request
function:
$request['RequestedShipment']['SmartPostDetail'] = addSmartPostDetail();
function addSmartPostDetail(){
$smartPostDetail = array(
'Indicia' => 'PARCEL_SELECT',
'AncillaryEndorsement' => 'CARRIER_LEAVE_IF_NO_RESPONSE',
'SpecialServices' => 'USPS_DELIVERY_CONFIRMATION',
'HubId' => 5087,
'CustomerManifestID' => myid,
);
return $smartPostDetail;
}
In the uc_fedex_quote
function, I have added a debug statement right after:
$response = uc_fedex_rate_request($packages, $origin, $destination);
drupal_set_message('<pre>'. print_r($response, TRUE) .'</pre>');
In the response I do not get SmartPost returned as an option.
This is what I had to do (note: I edited the uc_fedex.module directly):
Change the version to 14
$request['Version'] = array( 'ServiceId' => 'crs', 'Major' => '14', 'Intermediate' => '0', 'Minor' => '0', );
Add the following code:
$request['RequestedShipment']['SmartPostDetail'] = addSmartPostDetail(); function addSmartPostDetail(){ $smartPostDetail = array( 'Indicia' => 'PARCEL_SELECT', 'AncillaryEndorsement' => 'CARRIER_LEAVE_IF_NO_RESPONSE', 'SpecialServices' => 'USPS_DELIVERY_CONFIRMATION', 'HubId' => yourhubid, 'CustomerManifestID' => yourmanifestid, ); return $smartPostDetail; }
Add the following to _uc_fedex_ground_services(): 'SMART_POST' => t('FedEx Smart Post'),