I have discovered that when a customer uses an invalid zip code, instead of giving an error, this module gives a default rate of $11. Does this happen for anyone else?
Printable View
I have discovered that when a customer uses an invalid zip code, instead of giving an error, this module gives a default rate of $11. Does this happen for anyone else?
The regular UPS XML module returns an accurate rate even if the zip code is invalid... I wonder if there is any way to return the published rates instead of the negotiated rates if the postal code is invalid?
To remove the weight part of the results, comment out
PHP Code:
// if (DIMENSIONS_SUPPORTED) {
// $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');
// } else {
// $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
// }
I have also found that entering an invalid post code will return incorrect postage. For example, 1 oz item to France post code 4650 is $8.50, an order of magnitude off. Really France should have 5 digit post code, but customers often get it wrong. Scary.
Would a moderator please delete my post #43. The solution works only in Estimate Shipping. During the checkout, it actually prohibits UPS methods from showing.
I think I finally figured out how to remove weight and number of packages:
toPHP Code:
if ((is_array($upsQuote)) && (sizeof($upsQuote) > 0)) {
if (DIMENSIONS_SUPPORTED) {
$this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');
} else {
$this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
}
PHP Code:
if ((is_array($upsQuote)) && (sizeof($upsQuote) > 0)) {
if (DIMENSIONS_SUPPORTED) {
$this->quotes = array('id' => $this->code, 'module' => $this->title );
} else {
$this->quotes = array('id' => $this->code, 'module' => $this->title );
}
Recently the UPS XML module has had some issues. It's not functioning as it was a month ago which tells me there have been some changes on UPS's end. Anyone else having problems?
Could you provide any examples of what is NOT funtion the same as last month?
From UPS:
Helpdesk response:
We have received reports from customer using the Xpci Version of 1.0001 in their requests intermittently returning a file with only the XML declaration statement.
Please modify your code to use the version as shown in the developer guides:
<XpciVersion>1.0</XpciVersion>
</TransactionReference
Published Rates XML Request Example:
<?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
<AccessLicenseNumber>Your Access License</AccessLicenseNumber>
<UserId>Your User Id</UserId>
<Password>Your Password</Password>
</AccessRequest>
<?xml version="1.0"?>
<RatingServiceSelectionRequest xml:lang="en-US">
<Request>
<TransactionReference>
<CustomerContext>Your Customer Context</CustomerContext>
<XpciVersion>1.0</XpciVersion>
</TransactionReference>
<RequestAction>Rate</RequestAction>
<RequestOption>Rate</RequestOption>
</Request>
<Shipment>
<Shipper>
<Name>Shipper Name</Name>
<AttentionName>Shipper Attention Name</AttentionName>
<PhoneNumber>1234567890</PhoneNumber>
<FaxNumber>1234567890</FaxNumber>
<ShipperNumber>Your Shipper Number</ShipperNumber>
<Address>
<AddressLine1>Address Line 1</AddressLine1>
<City>City</City>
<StateProvinceCode>StateProvinceCode</StateProvinceCode>
<PostalCode>PostalCode</PostalCode>
<CountryCode>CountryCode</CountryCode>
</Address>
</Shipper>
<ShipTo>
<CompanyName>Ship To Company Name</CompanyName>
<AttentionName>Ship To Attention Name</AttentionName>
<PhoneNumber>1234567890</PhoneNumber>
<FaxNumber>1234567890</FaxNumber>
<Address>
<AddressLine1>Address Line 1</AddressLine1>
<City>City</City>
<StateProvinceCode>StateProvinceCode</StateProvinceCode>
<PostalCode>PostalCode</PostalCode>
<CountryCode>CountryCode</CountryCode>
</Address>
</ShipTo>
<ShipFrom>
<CompanyName>Ship From Company Name</CompanyName>
<AttentionName>Ship From Attention Name</AttentionName>
<PhoneNumber>1234567890</PhoneNumber>
<FaxNumber>1234567890</FaxNumber>
<Address>
<AddressLine1>Address Line 1</AddressLine1>
<City>City</City>
<StateProvinceCode>StateProvinceCode</StateProvinceCode>
<PostalCode>PostalCode</PostalCode>
<CountryCode>CountryCode</CountryCode>
</Address>
</ShipFrom>
<PaymentInformation>
<Prepaid>
<BillShipper>
<AccountNumber>Your Account Number</AccountNumber>
</BillShipper>
</Prepaid>
</PaymentInformation>
<Service>
<Code>59</Code>
<Description>2nd Day Air AM</Description>
</Service>
<Package>
<PackagingType>
<Code>02</Code>
<Description>UPS Package</Description>
</PackagingType>
<PackageWeight>
<UnitOfMeasurement>
<Code>LBS</Code>
</UnitOfMeasurement>
<Weight>5</Weight>
</PackageWeight>
<Dimensions>
<Length>10</Length>
<Width>5</Width>
<Height>7</Height>
</Dimensions>
</Package>
</Shipment>
</RatingServiceSelectionRequest>
There is also a Published Rates XML Response Example and a Published Rates XML Response Example and a Negotiated Rates XML Response Example