Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

I just realized that we had a GoDaddy SSL certificate (took this over from someone else).

The changes for GoDaddy are mentioned in step 12 of the readme.txt, almost at the bottom of that file.

Link to comment
Share on other sites

The changes for GoDaddy are mentioned in step 12 of the readme.txt, almost at the bottom of that file.

 

So I got the GoDaddy code put in and the timeout changed from 60 to 120 and now I am receiving this error

Error from cURL: Error [7]: Connect failed; Operation now in progress
Link to comment
Share on other sites

So I got the GoDaddy code put in and the timeout changed from 60 to 120 and now I am receiving this error

Connect failed but Operation in Progress???? Perhaps better to ask GoDaddy if those fixes in the readme.txt are still valid. They might have changed things or things on your server are different.

Link to comment
Share on other sites

Connect failed but Operation in Progress???? Perhaps better to ask GoDaddy if those fixes in the readme.txt are still valid. They might have changed things or things on your server are different.

 

Thanks I'll check it out.

Link to comment
Share on other sites

Thanks I'll check it out.

 

Well, GoDaddy gave me a different address for the proxy but that was all they could help me with. I only got the Connect Failed message that one time. All I am receiving now is

Error from cURL: Error [28]: connect() timed out!

 

Any more ideas? I really appreciate all your help. I'm about ready to give up though.

Link to comment
Share on other sites

Any more ideas?

How should I know better than the people who administer your server to set up curl on their server? They should provide you with the correct information or you didn't add it correctly to the file. Nothing I can do I'm afraid. This is outside of UPSXML. But without cURL you cannot setup a https connection with UPS. No https connection, no UPS rates.

 

You also need curl support for certain payment modules by the way.

Link to comment
Share on other sites

  • 2 weeks later...

I did try, but i really get stunt by get return from UPS say

"111211: The requested accessory option is unavailable between the selected locations."

 

I have the right original country info such as Two letter country code, Postal code, only the problem is the two letter province code I don't know how to input, because our store is not in USA or Canada. is this cause the error?

 

Could anyone can help me go out of this? Thank you very much!

Link to comment
Share on other sites

Turn on the logging and post the request sent to UPS. You can mask off the street address.

 

 

I have try to contact UPS, but unfortunately, our local UPS technical support department are not quite familiar with this UPS XML online tool. I can not make it clear. Could you please tell me which department I should contact or the contact email.

 

by the way, I attached the info as following, hope somebody can help me out.

 

DATE AND TIME: 2008-05-22 00:39:14

UPS URL: https://www.ups.com:443/ups.app/xml/Rate

UPS REQUEST: <?xml version="1.0"?>

<AccessRequest xml:lang="en-US">

<AccessLicenseNumber>888888888888888888</AccessLicenseNumber>

<UserId>888888</UserId>

<Password>8888888</Password>

</AccessRequest>

<?xml version="1.0"?>

<RatingServiceSelectionRequest xml:lang="en-US">

<Request>

<TransactionReference>

<CustomerContext>Rating and Service</CustomerContext>

<XpciVersion>1.0001</XpciVersion>

</TransactionReference>

<RequestAction>Rate</RequestAction>

<RequestOption>shop</RequestOption>

</Request>

<ShipTo>

<Address>

<City>Las Cruces</City>

<StateProvinceCode>NM</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>88003</PostalCode>

</Address>

</ShipTo>

<Package>

<PackagingType>

<Code>02</Code>

</PackagingType>

<PackageWeight>

<UnitOfMeasurement>

<Code>KGS</Code>

</UnitOfMeasurement>

<Weight>3.5</Weight>

</PackageWeight>

<PackageServiceOptions>

<InsuredValue>

<CurrencyCode>USD</CurrencyCode>

<MonetaryValue>448.00</MonetaryValue>

</InsuredValue>

</PackageServiceOptions>

</Package>

</Shipment>

</RatingServiceSelectionRequest>

 

UPS RESPONSE: <?xml version="1.0"?><RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>0</ResponseStatusCode><ResponseStatusDescription>Failure</ResponseStatusDescription><Error><ErrorSeverity>Hard</ErrorSeverity><ErrorCode>111211</ErrorCode><ErrorDescription>The requested accessory option is unavailable between the selected locations.</ErrorDescription></Error></Response></RatingServiceSelectionResponse>

Link to comment
Share on other sites

Kilograms in the US? Try LBS (admin section) and see if the error goes away please.

 

Thanks Jan for your kindly reply.

 

I set LBS by changing admin/configulation/ 'Shipping/Packaging' /Unit Weight from KGS to LBS. But the result is same.

 

DATE AND TIME: 2008-05-22 06:19:03
UPS URL: [url="https://www.ups.com:443/ups.app/xml/Rate"]https://www.ups.com:443/ups.app/xml/Rate[/url]
UPS REQUEST: <?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
  ...
</AccessRequest>
<?xml version="1.0"?>
<RatingServiceSelectionRequest xml:lang="en-US">
  <Request>
      <TransactionReference>
          <CustomerContext>Rating and Service</CustomerContext>
          <XpciVersion>1.0001</XpciVersion>
      </TransactionReference>
      <RequestAction>Rate</RequestAction>
      <RequestOption>shop</RequestOption>
  </Request>
  <Shipment>
      <Shipper>
          <Address>
              <City>Shenzhen</City>
              <StateProvinceCode>Guangdong</StateProvinceCode>
              <CountryCode>CN</CountryCode>
              <PostalCode>518034</PostalCode>
          </Address>
      </Shipper>
      <ShipTo>
          <Address>
              <City>Las Cruces</City>
              <StateProvinceCode>NM</StateProvinceCode>
              <CountryCode>US</CountryCode>
              <PostalCode>88003</PostalCode>
          </Address>
      </ShipTo>
      <Package>
          <PackagingType>
              <Code>02</Code>
          </PackagingType>
          <PackageWeight>
              <UnitOfMeasurement>
                  <Code>LBS</Code>
              </UnitOfMeasurement>
              <Weight>3.5</Weight>
          </PackageWeight>
          <PackageServiceOptions>
              <InsuredValue>
                  <CurrencyCode>USD</CurrencyCode>
                  <MonetaryValue>448.00</MonetaryValue>
              </InsuredValue>
          </PackageServiceOptions>
      </Package>
  </Shipment>
</RatingServiceSelectionRequest>

UPS RESPONSE: <?xml version="1.0"?><RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>0</ResponseStatusCode><ResponseStatusDescription>Failure</ResponseStatusDescription><Error><ErrorSeverity>Hard</ErrorSeverity><ErrorCode>111211</ErrorCode><ErrorDescription>The requested accessory option is unavailable between the selected locations.</ErrorDescription></Error></Response></RatingServiceSelectionResponse>

 

I have sent an email via UPS website online, but I don't know i could get any feedback or not.

 

Thanks very much for your time!

 

Best regards,

Link to comment
Share on other sites

I did not intend to suggest that you send the info to UPS, I wanted you to show US what your store was sending to the UPS server. Anyway...

 

Did you actually remove the street address from the XML? I said to mask it, but not remove it.

 

Silly question - does UPS ship from Shenzhen? The response suggests that it does not. Or perhaps the UPS automated system doesn't provide for this. Can you get a quote using the ups.com web site?

Link to comment
Share on other sites

Silly question - does UPS ship from Shenzhen? The response suggests that it does not. Or perhaps the UPS automated system doesn't provide for this. Can you get a quote using the ups.com web site?

According to the programmer information UPS does ship from and to China. The currency code is indeed USD and the weight units should be KGS. Since the error is about an accessory option and you have stated an insured value I suspect that the insurance request might be the cause of the error?

Link to comment
Share on other sites

I did not intend to suggest that you send the info to UPS, I wanted you to show US what your store was sending to the UPS server. Anyway...

 

Did you actually remove the street address from the XML? I said to mask it, but not remove it.

 

Silly question - does UPS ship from Shenzhen? The response suggests that it does not. Or perhaps the UPS automated system doesn't provide for this. Can you get a quote using the ups.com web site?

 

 

(1) Aha, I am so sorry for my English. I did not remove the street address, just try several different, and i also google one address is valid for UPS, I verify it on UPS website and get quotation.

 

(2) The following is the setting for UPS XML

Enable UPS Shipping
True


UPS Rates Access Key
***********


UPS Rates Username
**********

UPS Rates Password
*************

Pickup Method
Customer Counter

Packaging Type
Package


Customer Classification Code
01 - If you are billing to a UPS account and have a daily UPS pickup, 
01


Shipping Origin
All other origins

Origin City
Shenzhen

Origin State/Province
Guangdong


Origin Country
CN


Origin Zip/Postal Code
518034

Test or Production Mode
Production

Quote Type
Commercial

Negotiated rates
False

UPS Account Number
************


Manual Negotiated Rate
--none--

Handling Type
Flat Fee

Handling Fee
Handling fee for this shipping method.


Enable Insurance
False

UPS Currency Code
USD


Tax Class
--none--


Shipping Zone
--none--


Sort order of display.
2


Disallowed Shipping Methods

Next Day Air
2nd Day Air
Ground
Worldwide Express
Worldwide Express Plus
Worldwide Expedited
Express
Standard
3 Day Select
Next Day Air Saver
Next Day Air Early A.M.
Expedited
2nd Day Air A.M.
Saver
Express Early A.M.
Express Plus
Today Standard
Today Dedicated Courier
Today Intercity
Today Express
Today Express Saver

Shipping Delay
1


Email UPS errors
Yes


Time in Transit View Type
Detailed

Display Weight
False

(3) Yes, UPS do ship from our sity to the destination. And i have got quotation from UPS website and customer service dept.

Link to comment
Share on other sites

According to the programmer information UPS does ship from and to China. The currency code is indeed USD and the weight units should be KGS. Since the error is about an accessory option and you have stated an insured value I suspect that the insurance request might be the cause of the error?

 

Thanks Stevel and Jan very much for your effor.

 

I try disable Insurance request, but the result is the same. I will try different accessory option to see.

 

Hope everybody have a good day!

 

Sincerely,

Link to comment
Share on other sites

In order to stay competitive we charge less than UPS negotiated rates to customers in some parts of the US.

 

We are looking for a feature where the negotiated rate is reduced by a certain percentage in UPS quotes to customers in those states. We would want to be able to assign different percentages to different states, for example -15% to TX and -20% to CA.

 

I'd guess I'd have to add new fields to one of the tables to hold the state and percentage info; any idea where in the program would be the best place to do the calculation and what it would look like?

 

Peter

Link to comment
Share on other sites

I would hook in to the "handling fee" computation, replacing the fixed value from admin with a lookup from an array indexed by state codes for which you want to discount. If there is no array entry, no discount. Lazy person that I am, I would just hand-code the array in the shipping module

Link to comment
Share on other sites

I would hook in to the "handling fee" computation, replacing the fixed value from admin with a lookup from an array indexed by state codes for which you want to discount. If there is no array entry, no discount. Lazy person that I am, I would just hand-code the array in the shipping module

 

Any idea what the PHP would look like? I can do some basic stuff with PHP but lokup from an array is beyond me right now.

Link to comment
Share on other sites

I'd be happy to pay someone to help us with this -- any idea how I'd find someone?

 

Peter

 

In order to stay competitive we charge less than UPS negotiated rates to customers in some parts of the US.

 

We are looking for a feature where the negotiated rate is reduced by a certain percentage in UPS quotes to customers in those states. We would want to be able to assign different percentages to different states, for example -15% to TX and -20% to CA.

 

I'd guess I'd have to add new fields to one of the tables to hold the state and percentage info; any idea where in the program would be the best place to do the calculation and what it would look like?

 

Peter

Link to comment
Share on other sites

I have just released my own version of the UPS XML Rates and Services Shipping Module. I wanted to release it early to get feedback and bug reports. I dare say I have not tested it on any system but my own, so please consider it very beta.

 

I plan on improving this by extending it to support the more obscure features of the UPS XML gateway, and introduce intelligent product packing for anyone who has installed Tom Croix's Canada Post 3.1 module with dimensional support.

 

Enjoy.

 

 

Torin...

I have a new site and it had a $5 flat shipping rate which was default with the site. It was also visable on the cart page. My dropshipper only uses ups grd. I removed it and installed the ups grd module and it said it worked but was never visable anywhere no mater how deep into the cart I got. I have downloaded your UPS module and installed the code where you had instructed but still have nothing showing anywhere. I am very new to this type of progamming. I also did back up and remove the old ups mod. Am at wits end, dont have clue what I am doing or doing wrong.

 

Thank you. Salesnewbie101

Link to comment
Share on other sites

Any idea what the PHP would look like? I can do some basic stuff with PHP but lokup from an array is beyond me right now.

 

It's pretty simple. I'd insert the following code in function _upsDest:

 

$state_discounts = array ('TX' => 5, 'OK' => 7, 'NH' => 10); // Values are percent off

if ($country=='US' and tep_not_null($state_discounts[$stateprov])) {

$this->handling_fee = -$state_discounts[$stateprov];

}

 

Then set the handling fee to zero and the handling type to percentage in admin.

 

This will take 5% off for Texas, 7% off for Oklahoma and 10% off for New Hampshire.

 

I have not tested this but it should work. The key is that if an array key does not exist, attempting to get that array element returns NULL.

 

I will make the general comment that you cannot successfully customize an osCommerce store without learning at least the basics of PHP including array and string manipulation. Pick up a good book on PHP (I used "Programming PHP" from O'Reilly Press) and read. I see too many people just jumping in, trying to add contributions and getting in over their heads.

Link to comment
Share on other sites

I have had good luck with UPS technical support when I send them the exact request and response.

 

Thanks Steve for your encourage and Jan's guideline, and UPS support, i did get reply from UPS Third Level Production Support, in my particular case UPS does not support Insured Value for shipments originating in China.

 

But it is strange, the same error still there after i set "Enable Insurance" to "False", UPS return error message say

"<PackageServiceOptions>

<InsuredValue>

<CurrencyCode>USD</CurrencyCode>

<MonetaryValue>100</MonetaryValue>

</InsuredValue>

</PackageServiceOptions>"

 

then i go to upsxml.php comment out the following code:

" <InsuredValue>\n".

" <CurrencyCode>".MODULE_SHIPPING_UPSXML_CURRENCY_CODE."</CurrencyCode>\n".

" <MonetaryValue>".$this->item_price[$i]."</MonetaryValue>\n".

" </InsuredValue>\n".

 

finally, the error gone, and get same quotation as on UPS.com. I am not sure it is the right change or not, anyway, it work.

 

BUT the number is on CNY and currency code in USD, UPS said it can only return the currency of the country where UPS account apply. I am wondering if it is happend somebody have simple method to make the return quotation could be change relate to different currency?

 

Thanks everybody for your kindest concern.

Link to comment
Share on other sites

BUT the number is on CNY and currency code in USD, UPS said it can only return the currency of the country where UPS account apply.

Have you tried using CNY as a currency code? Makes more sense although the documentation from UPS says otherwise. But that might have changed already...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...