Jump to content
torinwalker

New UPS XML Shipping Module available

Recommended Posts

I am having the same problem as Lucid:

 

Parse error: parse error, unexpected $ in /home/sunramp/catalog/admin/includes/functions/general.php on line 1323

 

Warning: Cannot send session cache limiter - headers already sent (output started at /home/sunramp/catalog/admin/includes/functions/general.php:1323) in /home/sunramp/catalog/admin/includes/functions/sessions.php on line 67

 

I tried removing the whitespaces as instructed here:

 

You did read the osCommerce knowledge base on the common problem Cannot Add Header Information - Headers Already Sent?

 

I uploaded the 'general.php' and 'sessions.php' files without whitespaces and still get the error message.

 

Please help.

Share this post


Link to post
Share on other sites
Parse error: parse error, unexpected $ in /home/sunramp/catalog/admin/includes/functions/general.php on line 1323
I think this is where the trouble starts. I would say you can ignore the other messages (because the parse error message is sent before the body of the PHP page you get the "headers already sent" error). Perhaps you have a missing } brace in general.php after you did the changes for UPSXML or perhaps another small mistake. I would double check that file first.

Share this post


Link to post
Share on other sites

Thanks, Jan! The problem was with that file.

 

I successfully installed the UPS XML but now when I place an order I get this at checkout:

 

Warning: Failed opening 'includes/languages/english/modules/shipping/upsxml.php' for inclusion (include_path='.:/usr/lib/php') in /home/secure/catalog/includes/classes/shipping.php on line 36

 

Warning: Failed opening 'includes/modules/shipping/upsxml.php' for inclusion (include_path='.:/usr/lib/php') in /home/secure/catalog/includes/classes/shipping.php on line 37

 

Fatal error: Cannot instantiate non-existent class: upsxml in /home/secure/catalog/includes/classes/shipping.php on line 39

 

Could it be because the secure site is different from the osCommerce cart ('home/secure/catalog' instead of 'home/sunramp/catalog')?

Share this post


Link to post
Share on other sites

Got it. Our webmaster had a mirror catalog set up on the secure site. I just had to update the shipping module over there.

Share this post


Link to post
Share on other sites

Hello,

 

Thank you for this great module. I have a quick question, my company has discounted rates with UPS is there any way i can get those rates from UPS to show up instead of the regular price quotes?

 

thanks

Share this post


Link to post
Share on other sites
my company has discounted rates with UPS is there any way i can get those rates from UPS to show up instead of the regular price quotes?
You don't get regular price quotes with this module if you have discounted rates since UPS knows "who" you are when you make contact with their server (in contrast to the "regular" UPS module that comes with osC). So you should be fine.

Share this post


Link to post
Share on other sites
You don't get regular price quotes with this module if you have discounted rates since UPS knows "who" you are when you make contact with their server (in contrast to the "regular" UPS module that comes with osC). So you should be fine.

hmm that?s what I thought too. Unfortunately I keep getting the same price as a regular shipper rather then my discounted rate. (this translates to quotes 3 times higher than what I normally get!) :blink:

 

 

Im thinking this is more to do with something on UPS side, maybe the rates access key i have does not reflect the discounted rates or somethign like that. Ill just call them and see whats up.

Share this post


Link to post
Share on other sites

just in case others are wondering i talked to some poeple at UPS and UPS does NOT provide discounted rates thru their XML feed, you have to write a script which will take the standard quote that ups gives you and then apply the appropriate discounts your self and spit them out on oscommerce.

 

THe discounts are based on the varoius zones (whcih are based on postal codes) and also the UPS tier system (based on the ammount of business you do with UPS).

Share this post


Link to post
Share on other sites

I'm getting two errors using the module that I think might be related but I'm not quite sure. The first error is ERROR: No boxes to ship unpackaged product. I thought this might have something to do with the Ready to Ship check box in admin. So I would go in and check it and retest it only to be greeted with the ERROR: No boxes to ship unpackaged product message again. I'd go back and double check the Ready to Ship check box and it would be unchecked again. It's as if the check box is not retaining your selection. Any ideas on this one?

 

The second error is 10002: The XML document is well formed but the document is not valid If you prefer to use ups as your shipping method. I don't know if this has something to do with the No boxes error or not but everything looks set up correctly in the admin for the UPS XML module.

 

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites

Everyone,

 

I figured it out and the two errors were directly related to the Ready to Ship checkbox not retaining it's value. You MUST install the 11 Apr 2005 - UPS XML Rates v1.1.5a fix. Then everything works wonderfully....at least reports the quotes back to you...however I'm findng that the quote is different then what it should be but I guess that's another matter to solve.

 

I'm getting two errors using the module that I think might be related but I'm not quite sure.  The first error is ERROR: No boxes to ship unpackaged product.  I thought this might have something to do with the Ready to Ship check box in admin.  So I would go in and check it and retest it only to be greeted with the ERROR: No boxes to ship unpackaged product message again.  I'd go back and double check the Ready to Ship check box and it would be unchecked again.  It's as if the check box is not retaining your selection.  Any ideas on this one?

 

The second error is 10002: The XML document is well formed but the document is not valid If you prefer to use ups as your shipping method.  I don't know if this has something to do with the No boxes error or not but everything looks set up correctly in the admin for the UPS XML module.

 

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites

Hi there.

 

I have my new UPS Client number. The trick is I get a 250005 error code meanings, <ErrorDescription>No Access Identification provided</ErrorDescription>.

 

Here is the complete error message:

UPS RESPONSE: <?xml version="1.0"?><RatingServiceSelectionResponse><Response><TransactionReference></TransactionReference><ResponseStatusCode>0</ResponseStatusCode><ResponseStatusDescription>Failure</ResponseStatusDescription><Error><ErrorSeverity>Hard</ErrorSeverity><ErrorCode>250005</ErrorCode><ErrorDescription>No Access Identification provided</ErrorDescription></Error></Response></RatingServiceSelectionResponse>

 

I have called UPS, and I am waiting for an answer. I have not installed the dimensions extra to this package, should I? Is a SSL connection necessary?

 

Please help, I am opening in 5 days...

 

MArc


osCommerce 2.2 MS2 in 6 languages

TVA Intracomm

Numbers of visitors online

Who's online Enhancement

....

Share this post


Link to post
Share on other sites
The root cause is that in includes/modules/shipping/upsxml.php (from 1.1.5) there is a line early in the file that says:

 

define('DIMENSIONS_SUPPORTED', 1);

 

Make it:

define('DIMENSIONS_SUPPORTED', 0);

 

and the error will go away.

Indeed, this fixed the "10002" error on my new install.

 

Also, I don't know if it's been mentioned anywhere in this thread, but I found a slight problem in the install instructions for v1.1.5 -- nowhere does it specify to add the packaging table definition to the admin & catalog database_tables.php files. Works much, much better with the following added in:

 

define('TABLE_PACKAGING', 'packaging');

 

I haven't looked at older distributions to see if it was in there at one point and got dropped somehow in the latest, but I find it hard to imagine it's gone this far with no one bringing it up...

 

Dan

Share this post


Link to post
Share on other sites
define('TABLE_PACKAGING', 'packaging');

 

I haven't looked at older distributions to see if it was in there at one point and got dropped somehow in the latest, but I find it hard to imagine it's gone this far with no one bringing it up...

Actually, it should only be needed when you want to use the dimensions support (don't...).

 

Hopefully, you will be more succesfull in using upsxml then a number of folks who can't get it to work for some unknown reason.

Share this post


Link to post
Share on other sites

Has anyone tried to get full UPS address verification to work? (UPSxml will only check if the zip is in the right state).


------------------------------------------------------------------------

The first panacea for a mismanaged nation is inflation

of the currency; the second is war. Both bring a
temporary prosperity; both bring permanent ruin.
Ernest Hemingway
------------------------------------------------------------------------

Share this post


Link to post
Share on other sites

Here is an old problem that I've just come across

 

After installing UPSXML and running, the error log states:

 

Error from cURL: Error [1]: libcurl was built with SSL disabled, https: not supported!

UPS RESPONSE:

 

I've read the entire thread and found that everyone states what to do as far as gettiing cURL compiled with SSL. This seems like a fix for people who are running their own servers. What about people who pay a hosting service? what should I do?

 

I notice on line 55 of UPSXML that it says:

 

$this->protocol = 'https';

 

I tried to change it to just 'http' and the response I get in the log is:

 

Error from cURL: Error [52]: Empty reply from server

UPS RESPONSE:

 

Please help! much money at stake!

 

Thanks

Share this post


Link to post
Share on other sites

Call your hosting provider, ask them to enable curl with Https (secure) for your server. They might have to recompile php..

Share this post


Link to post
Share on other sites
Call your hosting provider, ask them to enable curl with Https (secure) for your server.  They might have to recompile php..

 

 

Wow, they did it!

 

I emailed the support center for the host and they responded back within 30 mins says that they had recompiled. contrib works PERFECT! (well, except that the text fields for the methods are rather long)

 

Thanks

Share this post


Link to post
Share on other sites

I was curious about how to really use this contrib.

 

Everything works to get a quote, but once an order has gone through, does this contrib actually send the info to UPS to process an order? pickup a package? track?

 

is there a way to have the order automatically processed with UPS and then a tracking # is automatically assigned to the order? I expect my client to have a large amount of orders and want this to be somewhat automated.

 

Any help?

Share this post


Link to post
Share on other sites

Help - I just added this contribution - seemed really easy - normally all goes well with contributions. I get: 1146 - Table 'crazyabo_shop.TABLE_PACKAGING' doesn't exist

 

select * from TABLE_PACKAGING order by package_cost;

 

[TEP STOP],

 

I get this whether my table is there or not. Help. Am I doing something out of sequence? Please reply. Help.


Kim

Share this post


Link to post
Share on other sites

Hello, Hope someone can help.

 

I just intstalled this contribution UPSXML_v1.1.5.

 

I configured it with my ups key etc.

I turned off the package size option.

I have ssl working

 

I am getting this error

 

Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway

 

 

I enabled logging and got this.

 

------------------------------------------

DATE AND TIME: 2005-08-11 21:27:51

UPS URL: https://wwwcie.ups.com:443/ups.app/xml/TimeInTransit

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

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

<AccessLicenseNumber>***********</AccessLicenseNumber>

<UserId>*********</UserId>

<Password>*******</Password>

</AccessRequest>

<?xml version="1.0"?>

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

<Request>

<TransactionReference>

<CustomerContext>Time in Transit</CustomerContext>

<XpciVersion>1.0001</XpciVersion>

</TransactionReference>

<RequestAction>TimeInTransit</RequestAction>

</Request>

<TransitFrom>

<AddressArtifactFormat>

<PoliticalDivision2>scottsdale</PoliticalDivision2>

<PoliticalDivision1>AZ</PoliticalDivision1>

<CountryCode>US</CountryCode>

<PostcodePrimaryLow>85251</PostcodePrimaryLow>

</AddressArtifactFormat>

</TransitFrom>

<TransitTo>

<AddressArtifactFormat>

<PoliticalDivision2>scottsdale</PoliticalDivision2>

<PoliticalDivision1>AZ</PoliticalDivision1>

<CountryCode>US</CountryCode>

<PostcodePrimaryLow>85251</PostcodePrimaryLow>

<PostcodePrimaryHigh>85251</PostcodePrimaryHigh>

</AddressArtifactFormat>

</TransitTo>

<PickupDate>20050812</PickupDate>

<ShipmentWeight>

<UnitOfMeasurement>

<Code>LBS</Code>

</UnitOfMeasurement>

<Weight>10</Weight>

</ShipmentWeight>

<InvoiceLineTotal>

<CurrencyCode>USD</CurrencyCode>

<MonetaryValue>100</MonetaryValue>

</InvoiceLineTotal>

</TimeInTransitRequest>

 

Error from cURL: Error [7]:

UPS RESPONSE:

------------------------------------------

Time in Transit: 0

------------------------------------------

DATE AND TIME: 2005-08-11 21:28:51

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

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

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

<AccessLicenseNumber>********</AccessLicenseNumber>

<UserId>*****</UserId>

<Password>*****</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>

<PickupType>

<Code>01</Code>

</PickupType>

<Shipment>

<Shipper>

<Address>

<City>scottsdale</City>

<StateProvinceCode>AZ</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>85251</PostalCode>

</Address>

</Shipper>

<ShipTo>

<Address>

<City>scottsdale</City>

<StateProvinceCode>AZ</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>85251</PostalCode>

<ResidentialAddressIndicator/>

</Address>

</ShipTo>

<Package>

<PackagingType>

<Code>02</Code>

</PackagingType>

<PackageWeight>

<UnitOfMeasurement>

<Code>LBS</Code>

</UnitOfMeasurement>

<Weight>11.4</Weight>

</PackageWeight>

<PackageServiceOptions>

<InsuredValue>

<CurrencyCode>USD</CurrencyCode>

<MonetaryValue>700</MonetaryValue>

</InsuredValue>

</PackageServiceOptions>

</Package>

</Shipment>

<CustomerClassification>

<Code>01</Code>

</CustomerClassification>

</RatingServiceSelectionRequest>

 

Error from cURL: Error [7]:

UPS RESPONSE:

 

 

I also tried a few of the uncomment this fixes in the upsxml.php but none seemed to work.

 

Any help would be greatly appreciated!!!!!

Share this post


Link to post
Share on other sites

The module is workign fine for me most of the time , but i occassioanlly run into a problem where i get this error message:

 

Fatal error: Cannot use string offset as an array in

\www\includes\modules\shipping\upsxml.php on line 308

 

 

it only occurs once in a while but im not sure why, has any one seen this kind of error before?

Share this post


Link to post
Share on other sites

Installed and works except it doesnt display the shipping costs on the invoice, emails sent to customer and admin, as well as the final step of check out where it gives you all the costs. it adds the shipping to the total but doesnt say it does (ex: shipping =$$ ......is missing).

Share this post


Link to post
Share on other sites
I am getting this error

Error from cURL: Error [7]:

According to the cURL website Error 7 would be:

CURLE_COULDNT_CONNECT (7)

Failed to connect() to host or proxy.

Perhaps the UPS server was down?

Share this post


Link to post
Share on other sites
it doesnt display the shipping costs on the invoice, emails sent to customer and admin, as well as the final step of check out where it gives you all the costs.  it adds the shipping to the total but doesnt say it does (ex: shipping =$$ ......is missing).

This is not the job of the shipping modules. The shipping modules return shipping cost etc. to checkout_shipping, the customer picks one and then it is up to the osC code to store and display that info. UPSXML has nothing to do with that IMHO.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×