Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

Hello,

 

So I installed the UPS XML module and I was having the same problem with the table_packaging error. I used the solution JanZ put here and the problem went away...unfortunately instead of opening the checkout page the browser opens a dialog box and asks me where I want to download it.

 

Any one know why that is, or how to fix this? Thanks!

 

Hmmm...nobody knows?

 

Anyways, I tried to upload it on another server, and the contribution worked there. The only difference I can see are the following:

 

1. The test server had a clean installation of oscommerce, while the live server had the On-The-Fly thumbnail generator and the credit card payment gateway module installed on it.

 

2. The test server had PHP Version 4.4.0 with libcurl/7.12.0 OpenSSL/0.9.7a ipv6 zlib/1.1.4, while the live server had PHP Version 4.3.11 with libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.1.4

 

Will any of these 2 items I mentioned affect the contribution in the way I mentioned in my earlier post?

 

Thanks!

Link to comment
Share on other sites

After making this mod (the only mod I have) when I try to add something to my cart I get this error:

 

1054 - Unknown column 'p.products_length' in 'field list'

 

select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_weight, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, p.products_tax_class_id from products p, products_description pd where p.products_id='21' and pd.products_id = p.products_id and pd.language_id = '1'

 

[TEP STOP]

 

 

Can someone help??

 

MM

Link to comment
Share on other sites

After making this mod (the only mod I have) when I try to add something to my cart I get this error:

 

1054 - Unknown column 'p.products_length' in 'field list'

 

select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_weight, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, p.products_tax_class_id from products p, products_description pd where p.products_id='21' and pd.products_id = p.products_id and pd.language_id = '1'

Looks like you added the dimensions support without running the necessary sql (adds fields for products_length, products_width, products_height, products_ready_to_ship to the table products). Make sure you read the 1.1.5a fix for the dimensions too.
Link to comment
Share on other sites

I did nothing with the SQL as I did not want to add that. I guess I have to.

 

I worked through all the updates which took hours, which one do I start with and how should I proceed with this?

 

Can I just jump right to the 1.1.5?

 

Thanks!!

Link to comment
Share on other sites

I did nothing with the SQL as I did not want to add that. I guess I have to.

 

I worked through all the updates which took hours, which one do I start with and how should I proceed with this?

 

Can I just jump right to the 1.1.5?

Apparently you did make at some of the changes described in dimensions.txt. That gives you the error. No need to install the sql if you don't want to add this to your site.

 

Working through updates? Why? You only need the latest version and follow the instructions as described in the readme.txt (but skip step 6).

 

It shouldn't and doesn't take hours to install.

Link to comment
Share on other sites

Ok great I will play around with all this.

 

Seems like a lot of files bits need to be changed in the demension.txt and readme.txt or are those all taken care of but uploading the files in the package?

 

Once again this looks like it is going to take a lot of time looking for code and replacing it in certain files.

 

Also do I need to go past the 1.1.5 update with the other two that are listed above on this page?:

 

http://www.oscommerce.com/community/contri...ons,1323/page,9

 

Thanks

Link to comment
Share on other sites

Seems like a lot of files bits need to be changed in the demension.txt and readme.txt or are those all taken care of but uploading the files in the package?
I told you: do not do the things that are described in the dimensions.txt (reverse them actually).
Once again this looks like it is going to take a lot of time looking for code and replacing it in certain files.
Come on: small changes in 2 files (catalog/admin/modules.php, catalog/admin/includes/functions/general.php), one sql change, and uploading 4 files? You haven't seen Separate Pricing per Customer or CCGV yet I guess.

 

Also do I need to go past the 1.1.5 update with the other two that are listed above on this page?
No.
Link to comment
Share on other sites

Well I made the changes to catalog/admin/modules.php and catalog/admin/includes/functions/general.php as well changed the set_function from VARCHAR(255) to TEXT in the configuration table in the database.

 

Then went back to the store:

 

http://d123166.u28.megahosters.com/catalog/index.php

 

You can see the error when you try to add something to your cart.

 

Not sure what is wrong still.

 

Error:

 

 

1054 - Unknown column 'p.products_length' in 'field list'

 

select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_weight, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, p.products_tax_class_id from products p, products_description pd where p.products_id='16' and pd.products_id = p.products_id and pd.language_id = '1'

 

[TEP STOP]

Link to comment
Share on other sites

Error:

1054 - Unknown column 'p.products_length' in 'field list'

 

select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_weight, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, p.products_tax_class_id from products p, products_description pd where p.products_id='16' and pd.products_id = p.products_id and pd.language_id = '1'

You will have to revert the changes you made to catalog/includes/classes/shopping_cart.php (step 3 in dimensions.txt) and the error on the catalog side will go away. Then you only need to revert the changes in the admin part ;)
Link to comment
Share on other sites

Well I made the changes to catalog/admin/modules.php and catalog/admin/includes/functions/general.php as well changed the set_function from VARCHAR(255) to TEXT in the configuration table in the database.

 

Then went back to the store:

 

http://d123166.u28.megahosters.com/catalog/index.php

 

You can see the error when you try to add something to your cart.

 

Not sure what is wrong still.

 

Error:

1054 - Unknown column 'p.products_length' in 'field list'

 

select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_weight, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, p.products_tax_class_id from products p, products_description pd where p.products_id='16' and pd.products_id = p.products_id and pd.language_id = '1'

 

[TEP STOP]

 

You need to set the dimension support to 0 in the upsxm.php file. That way the dimension support will be disabled

Link to comment
Share on other sites

Looks like we are on the right track... When I add something to my cart and go through the checkout I get this on the summary page:

 

This is currently the only shipping method available to use on this order.

United Parcel Service (XML)

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

If you prefer to use ups as your shipping method, please contact us via Email.

 

Here are the settings I have in the admin sections for the UPS Module:

 

United Parcel Service (XML)

 

Enable UPS Shipping

True

 

UPS Rates Access Key

DBE18343********

 

UPS Rates Username

********

 

UPS Rates Password

********

 

Pickup Method

Daily Pickup

 

Packaging Type

Customer Package

 

Customer Classification Code

01

 

Shipping Origin

Canada Origin

 

Origin City

Surrey

 

Origin State/Province

BC

 

Origin Country

CAD

 

Origin Zip/Postal Code

V3S4E2

 

Test or Production Mode

Production

 

Unit Weight

KGS

 

Unit Length

IN

 

Quote Type

Residential

 

Handling Fee

0

 

Enable Insurance

True

 

UPS Currency Code

CAD

 

Tax Class

--none--

 

Shipping Zone

--none--

 

Sort order of display.

0

 

Shipping Methods

Next Day Air, 2nd Day Air, Ground, Worldwide Express, Standard, 3 Day Select, Next Day Air Early A.M.

 

Shipping Delay

1

 

 

Any more suggestions all mighty oscommerce ones?

Link to comment
Share on other sites

I just installed V1.1.5 And am getting these errors in the admin shipping modules:

Warning: main(includes/classes/xmldocument.php): failed to open stream: No such file or directory in /home/httpd/vhosts/drjbs.com/httpdocs/cart/includes/modules/shipping/upsxml.php on line 23

 

Fatal error: main(): Failed opening required 'includes/classes/xmldocument.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/drjbs.com/httpdocs/cart/includes/modules/shipping/upsxml.php on line 23

 

Sorry I didn't go through all 32 pages of this topic, can anyone shed a little light here? Thanks, Mike

Link to comment
Share on other sites

I just installed V1.1.5 And am getting these errors in the admin shipping modules:

Warning: main(includes/classes/xmldocument.php): failed to open stream: No such file or directory in /home/httpd/vhosts/drjbs.com/httpdocs/cart/includes/modules/shipping/upsxml.php on line 23

 

Fatal error: main(): Failed opening required 'includes/classes/xmldocument.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/drjbs.com/httpdocs/cart/includes/modules/shipping/upsxml.php on line 23

 

Sorry I didn't go through all 32 pages of this topic, can anyone shed a little light here? Thanks, Mike

 

Fixed. For future reference, I went by the instructions only. After looking harder at the package I saw`there was sql for the db and a ton more files not mentined in the instructions. whew...

 

And Thanks for the contribution! You guys don't get nearly the recognition you deserve. I for one appreciate it! Mike

Link to comment
Share on other sites

Hi,

I have been reading the 32 pages...but somehow can not find the answer to my problem...though I have seen it posted before. Here is the erroe that I am getting "10001: The XML document is not well formed". I have deminsion support set to 0. I have turned on logging... here is what I am getting in the log:

 

DATE AND TIME: 2005-12-22 00:50:48

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

UPS REQUEST using exec(): <?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>03</Code>

</PickupType>

<Shipment>

<Shipper>

<Address>

<City>Asheville</City>

<StateProvinceCode>NC</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>28804</PostalCode>

</Address>

</Shipper>

<ShipTo>

<Address>

<City>Candler</City>

<StateProvinceCode>NC</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>28715</PostalCode>

</Address>

</ShipTo>

<Package>

<PackagingType>

<Code>02</Code>

</PackagingType>

<PackageWeight>

<UnitOfMeasurement>

<Code>LBS</Code>

</UnitOfMeasurement>

<Weight>3</Weight>

</PackageWeight>

<PackageServiceOptions>

<InsuredValue>

<CurrencyCode>USD</CurrencyCode>

<MonetaryValue>20</MonetaryValue>

</InsuredValue>

</PackageServiceOptions>

</Package>

</Shipment>

<CustomerClassification>

<Code>03</Code>

</CustomerClassification>

</RatingServiceSelectionRequest>

 

UPS RESPONSE using exec(): <?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>10001</ErrorCode

><ErrorDescription>The XML document is not well formed</ErrorDescription></Error></Response></RatingServiceSelectionResponse>

 

Any help with this will be greatly appreciated.

Link to comment
Share on other sites

I have been reading the 32 pages...but somehow can not find the answer to my problem...though I have seen it posted before. Here is the erroe that I am getting "10001: The XML document is not well formed". I have deminsion support set to 0. I have turned on logging... here is what I am getting in the log:
Looks like a valid request to me. One question though: why are you using exec()? Normally, it is set as 0 (line 80) and using exec is really more like a last resort.

 

I got that error all the time and had to add "addslashes" to the xmlRequest to avoid it (line 630). Perhaps UPS "fixed" that and is now complaining of the added slashes?

// using addslashes was the only way to avoid UPS returning the 1001 error: The XML document is not well formed
$command = "".$curl_path." -d \"".addslashes($xmlRequest)."\" ".$url."";

Try setting exec = 0 and if you can only use exec try it without the addslashes:

	$command = "".$curl_path." -d \"". $xmlRequest ."\" ".$url."";

 

DATE AND TIME: 2005-12-22 00:50:48
UPS URL: https://wwwcie.ups.com:443/ups.app/xml/Rate

Should be www.ups.com:443 for the "real" server (see a few post earlier).

Link to comment
Share on other sites

Spike,

Origin Country

CAD

The install says:

Enter the two-letter code for your origin country

whereas you entered CAD. That might be the thing UPS is complaining about. If that doesn't work, enable logging (see the source of catalog/includes/modules/shipping/upsxml.php) and see what UPS is exactly complaining about.

Link to comment
Share on other sites

Hi Janz...Thanks for the quick response... I have made the changes you suggested and now I am getting this error:

 

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

 

Here is what is in the log:

 

Time in Transit: 0

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

DATE AND TIME: 2005-12-22 08:18:02

UPS URL: https://www.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>03</Code>

</PickupType>

<Shipment>

<Shipper>

<Address>

<City>Asheville</City>

<StateProvinceCode>NC</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>28804</PostalCode>

</Address>

</Shipper>

<ShipTo>

<Address>

<City>Candler</City>

<StateProvinceCode>NC</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>28715</PostalCode>

</Address>

</ShipTo>

<Package>

<PackagingType>

<Code>02</Code>

</PackagingType>

<PackageWeight>

<UnitOfMeasurement>

<Code>LBS</Code>

</UnitOfMeasurement>

<Weight>3</Weight>

</PackageWeight>

<PackageServiceOptions>

<InsuredValue>

<CurrencyCode>USD</CurrencyCode>

<MonetaryValue>20</MonetaryValue>

</InsuredValue>

</PackageServiceOptions>

</Package>

</Shipment>

<CustomerClassification>

<Code>03</Code>

</CustomerClassification>

</RatingServiceSelectionRequest>

 

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

UPS RESPONSE:

 

I am not running ssl because I am not taking credit cards... My only payment method is paypal. Is this a problem? I have also run the curl test that is posted somewhere and it worked. Thanks in advance for the help.

Link to comment
Share on other sites

This says it all:

Error from cURL: Error [1]: libcurl was built with SSL disabled, https: not supported!
cURL works (partly), but without SSL you can't connect with a safe connection (https) to the UPS Server. Since you are sending a login name and a password, a regular http connection is not safe. No https, no connect.
Link to comment
Share on other sites

Spike,

The install says:

Enter the two-letter code for your origin country

whereas you entered CAD. That might be the thing UPS is complaining about. If that doesn't work, enable logging (see the source of catalog/includes/modules/shipping/upsxml.php) and see what UPS is exactly complaining about.

 

Hi Jan,

 

I changed CAD to CA which is the standard country code for Canada.... Sorry I totally missed that. :-"

 

It still returns the same error...

 

Now how do I enable logging? As well I am not sure what you mean by "If that doesn't work, enable logging (see the source of catalog/includes/modules/shipping/upsxml.php) and see what UPS is exactly complaining about."

 

Thanks.

Link to comment
Share on other sites

Ok. After a lot of work I think I now have curl with ssl support, but I am back to this error:

 

10001: The XML document is not well formed.

 

I tired with exec set to 0 and 1 with and without addslashes. The error never changes.

 

Here is the error log:

 

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

Time in Transit: 0

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

DATE AND TIME: 2005-12-23 10:24:04

UPS URL: https://www.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>03</Code>

</PickupType>

<Shipment>

<Shipper>

<Address>

<City>Asheville</City>

<StateProvinceCode>NC</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>28804</PostalCode>

</Address>

</Shipper>

<ShipTo>

<Address>

<City>Candler</City>

<StateProvinceCode>NC</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>28715</PostalCode>

</Address>

</ShipTo>

<Package>

<PackagingType>

<Code>02</Code>

</PackagingType>

<PackageWeight>

<UnitOfMeasurement>

<Code>LBS</Code>

</UnitOfMeasurement>

<Weight>3</Weight>

</PackageWeight>

<PackageServiceOptions>

<InsuredValue>

<CurrencyCode>USD</CurrencyCode>

<MonetaryValue>67</MonetaryValue>

</InsuredValue>

</PackageServiceOptions>

</Package>

</Shipment>

<CustomerClassification>

<Code>03</Code>

</CustomerClassification>

</RatingServiceSelectionRequest>

 

UPS RESPONSE: <?xml version="1.0"?><RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0001</XpciVersion></Transactio

nReference><ResponseStatusCode>0</ResponseStatusCode><ResponseStatusDescription>Failure</ResponseStatusDescription><Error><ErrorSeverity>Hard</ErrorSeverity><ErrorCode>10001</ErrorCode><ErrorDescri

ption>The XML document is not well formed</ErrorDescription></Error></Response></RatingServiceSelectionResponse>

 

 

Any ideas?

Link to comment
Share on other sites

10001: The XML document is not well formed.
Sorry, don't have a clue. The XML request looks perfectly valid to me, and is not any different from what I have in the logs. Absolutely flabbergasting. I can only suggest to send the UPS folks this logged request and ask them what is wrong with it. I think more people got this error without ever coming back to tell us if they solved it or not. It might be something trivial that we are not aware of...
Link to comment
Share on other sites

I posted this at another place but maybe this is a better spot for help. Sorry for the repetition.

 

I setup the XML shipping mod and now get these errors at the shipping page:

 

Warning: reset(): Passed variable is not an array or object in /home/httpd/vhosts/drjbs.com/httpdocs/cart/includes/classes/shipping.php on line 54

 

Warning: Variable passed to each() is not an array or object in /home/httpd/vhosts/drjbs.com/httpdocs/cart/includes/classes/shipping.php on line 55

 

Line 54 and 55 of the shipping.php file is:

reset($this->modules);

while (list(, $value) = each($this->modules)) {

 

Any help or hints appreciated. Thanks! Mike

Link to comment
Share on other sites

Mike,

Warning: reset(): Passed variable is not an array or object in /home/httpd/vhosts/drjbs.com/httpdocs/cart/includes/classes/shipping.php on line 54
It sounds like not a single shipping module having been enabled. Check your settings again (Do you want to use UPS XML... I think the phrase is) and perhaps temporarily add something like the default flat rate to see if the error goes away.
Link to comment
Share on other sites

Mike,

It sounds like not a single shipping module having been enabled. Check your settings again (Do you want to use UPS XML... I think the phrase is) and perhaps temporarily add something like the default flat rate to see if the error goes away.

I get this only when I enable the UPS XML shipping module, and disable the standard UPS module. The standard UPS module works fine alone. If I enable both there is no error but I'm only getting the standard output.

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...