TedInAK Posted March 14, 2007 Posted March 14, 2007 Hi...I apologize in advance if this has already been discussed before, but I couldn't find it if it was. I ported this over to zen cart, and when dimensional support is turned off it retrieves a quote from ups w/ no problem. But when it's turned on i get "10002: The XML document is well formed but the document is not valid..." And in my error log, I noticed the UPS REQUEST contains <Weight>0</Weight> Is this a known error? Quote
TedInAK Posted March 14, 2007 Author Posted March 14, 2007 And here is the full error log: ------------------------------------------ DATE AND TIME: 2007-03-14 11:15:10 UPS URL: https://wwwcie.ups.com:443/ups.app/xml/TimeInTransit UPS REQUEST: <?xml version="1.0"?> <AccessRequest xml:lang="en-US"> <AccessLicenseNumber>DELETED</AccessLicenseNumber> <UserId>DELETED</UserId> <Password>DELETED</Password> </AccessRequest> <?xml version="1.0"?> <TimeInTransitRequest xml:lang="en-US"> <Request> <TransactionReference> <CustomerContext>Time in Transit</CustomerContext> <XpciVersion>1.0002</XpciVersion> </TransactionReference> <RequestAction>TimeInTransit</RequestAction> </Request> <TransitFrom> <AddressArtifactFormat> <PoliticalDivision2>Beverly Hills</PoliticalDivision2> <PoliticalDivision1>CA</PoliticalDivision1> <CountryCode>US</CountryCode> <PostcodePrimaryLow>90210</PostcodePrimaryLow> </AddressArtifactFormat> </TransitFrom> <TransitTo> <AddressArtifactFormat> <PoliticalDivision2>Ellensburg</PoliticalDivision2> <PoliticalDivision1>WA</PoliticalDivision1> <CountryCode>US</CountryCode> <PostcodePrimaryLow>98926</PostcodePrimaryLow> <PostcodePrimaryHigh>98926</PostcodePrimaryHigh> </AddressArtifactFormat> </TransitTo> <ShipmentWeight> <UnitOfMeasurement> <Code>LBS</Code> </UnitOfMeasurement> <Weight>0</Weight> </ShipmentWeight> <InvoiceLineTotal> <CurrencyCode>USD</CurrencyCode> <MonetaryValue>100</MonetaryValue> </InvoiceLineTotal> <PickupDate>20070315</PickupDate> </TimeInTransitRequest> UPS RESPONSE: <?xml version="1.0"?><TimeInTransitResponse><Response><TransactionReference><CustomerContext>Time in Transit</CustomerContext><XpciVersion>1.0002</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><TransitResponse><PickupDate>2007-03-15</PickupDate><TransitFrom><AddressArtifactFormat><PoliticalDivision2>BEVERLY HILLS</PoliticalDivision2><PoliticalDivision1>CA</PoliticalDivision1><Country>UNITED STATES</Country><CountryCode>US</CountryCode><PostcodePrimaryLow>90210</PostcodePrimaryLow></AddressArtifactFormat></TransitFrom><TransitTo><AddressArtifactFormat><PoliticalDivision2>ELLENSBURG</PoliticalDivision2><PoliticalDivision1>WA</PoliticalDivision1><Country>UNITED STATES</Country><CountryCode>US</CountryCode><PostcodePrimaryLow>98926</PostcodePrimaryLow></AddressArtifactFormat></TransitTo><InvoiceLineTotal><CurrencyCode>USD</CurrencyCode><MonetaryValue>100.00</MonetaryValue></InvoiceLineTotal><Disclaimer>Services listed as guaranteed are backed by a money-back guarantee for transportation charges only. UPS guarantees the day of delivery for every ground package you ship to any address within the 48 contiguous states, except for any ground package originating in Alaska or Hawaii. In addition, the guarantee applies to shipments from Puerto Rico to the 48 contiguous states. See Terms and Conditions in the Service Guide for details.</Disclaimer><ServiceSummary><Service><Code>1DM</Code><Description>UPS Next Day Air Early A.M.</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>1</BusinessTransitDays><Time>10:00:00</Time><PickupDate>2007-03-15</PickupDate><Date>2007-03-16</Date><DayOfWeek>FRI</DayOfWeek></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>1DA</Code><Description>UPS Next Day Air</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>1</BusinessTransitDays><Time>23:00:00</Time><PickupDate>2007-03-15</PickupDate><Date>2007-03-16</Date><DayOfWeek>FRI</DayOfWeek></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>2DA</Code><Description>UPS 2nd Day Air</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>2</BusinessTransitDays><Time>23:00:00</Time><PickupDate>2007-03-15</PickupDate><Date>2007-03-19</Date><DayOfWeek>MON</DayOfWeek></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>3DS</Code><Description>UPS 3 Day Select</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>3</BusinessTransitDays><Time>23:00:00</Time><PickupDate>2007-03-15</PickupDate><Date>2007-03-20</Date><DayOfWeek>TUE</DayOfWeek></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>GND</Code><Description>UPS Ground</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>3</BusinessTransitDays><Time>23:00:00</Time><PickupDate>2007-03-15</PickupDate><Date>2007-03-20</Date><DayOfWeek>TUE</DayOfWeek></EstimatedArrival></ServiceSummary><MaximumListSize>35</MaximumListSize></TransitResponse></TimeInTransitResponse> ------------------------------------------ Business Transit: UPS Next Day Air Early A.M. = 2007-03-16 Business Transit: UPS Next Day Air = 2007-03-16 Business Transit: UPS 2nd Day Air = 2007-03-19 Business Transit: UPS 3 Day Select = 2007-03-20 Business Transit: UPS Ground = 2007-03-20 ------------------------------------------ Time in Transit: 0 ------------------------------------------ DATE AND TIME: 2007-03-14 11:15:11 UPS URL: https://wwwcie.ups.com:443/ups.app/xml/Rate UPS REQUEST: <?xml version="1.0"?> <AccessRequest xml:lang="en-US"> <AccessLicenseNumber>DELETED</AccessLicenseNumber> <UserId>DELETED</UserId> <Password>DELETED</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>Beverly Hills</City> <StateProvinceCode>CA</StateProvinceCode> <CountryCode>US</CountryCode> <PostalCode>90210</PostalCode> </Address> </Shipper> <ShipTo> <Address> <City>Ellensburg</City> <StateProvinceCode>WA</StateProvinceCode> <CountryCode>US</CountryCode> <PostalCode>98926</PostalCode> <ResidentialAddressIndicator/> </Address> </ShipTo> </Shipment> <CustomerClassification> <Code>01</Code> </CustomerClassification> </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>10002</ErrorCode><ErrorDescription>The XML document is well formed but the document is not valid</ErrorDescription><ErrorLocation><ErrorLocationElementName>RatingServiceSelectionRequest/Shipment/Package</ErrorLocationElementName></ErrorLocation></Error></Response></RatingServiceSelectionResponse> Quote
Jan Zonjee Posted March 15, 2007 Posted March 15, 2007 when dimensional support is turned off it retrieves a quote from ups w/ no problem. But when it's turned on i get "10002: The XML document is well formed but the document is not valid..." And in my error log, I noticed the UPS REQUEST contains <Weight>0</Weight> Is this a known error? No, that is a first. When not using dimensional support, the number of boxes and weight is determined by how osC is doing that (using tare weight etc.). However, when you turn on dimensional support the weight and dimensions is determined after obtaining the products with the function get_products from the includes/classes/shopping_cart.php (which is changed with the addition of dimensions...). Perhaps that is different in zen cart? See around line 223 in modules/shipping/upsxml.php: $productsArray = $cart->get_products(); if ($this->dimensions_support > 0) { $productsArray = $this->more_dimensions_to_productsArray($productsArray); } Quote
TedInAK Posted March 16, 2007 Author Posted March 16, 2007 No, that is a first. When not using dimensional support, the number of boxes and weight is determined by how osC is doing that (using tare weight etc.). However, when you turn on dimensional support the weight and dimensions is determined after obtaining the products with the function get_products from the includes/classes/shopping_cart.php (which is changed with the addition of dimensions...). Perhaps that is different in zen cart? See around line 223 in modules/shipping/upsxml.php: $productsArray = $cart->get_products(); if ($this->dimensions_support > 0) { $productsArray = $this->more_dimensions_to_productsArray($productsArray); } Thanks a bunch for the help...that was it. I had already adapted that line for zen cart but didn't add the weight and dimensions to each product (zen doesn't do the per-product weight). And then I had to change all 'quantity' to 'qty'. Now I have another dillema...for some reason the usp xml response shows the correct weights of each box (7 boxes w/ an average 47.5 lbs and 1 box at 17 lbs) but then shows a "billing weight" of 81 lbs for each of the 8 boxes?? I guess I should search the forums and post a separate question if I can't find a solution. Thanks again, JanZ...you definitely set me on the right track. :thumbsup: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.