Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

Im getting an error after installing. Everything seems to work other then when Iog into the admin interface I get this error and the login page has to be reloaded and start all over again.

 

Deprecated: Function ereg_replace() is deprecated in /home/content/72/10252872/html/catalog/lqux39/includes/functions/general.php on line 67

 

Warning: Cannot modify header information - headers already sent by (output started at /home/content/72/10252872/html/catalog/lqux39/includes/functions/general.php:67) in/home/content/72/10252872/html/catalog/lqux39/includes/functions/general.php on line 34

 

 

 

I looked at the coding, but didnt see anything an obvious errors

Link to comment
Share on other sites

Think I found it,

 

line 34: header('Location: ' . $url);

 

ADD ABOVE THIS LINE

 

 

if ( strpos($url, '&') !== false ) {

$url = str_replace('&', '&', $url);

}

 

And about line 71 find this:

function tep_sanitize_string($string) {

$string = ereg_replace(' +', ' ', $string);

return preg_replace("/[<>]/", '_', $string);

}

 

 

 

 

Edit it to look like this:

 

function tep_sanitize_string($string) {

//$string = ereg_replace(' +', ' ', $string);

$patterns = array ('/ +/','/[<>]/');

$replace = array (' ', '_');

return preg_replace("/[<>]/", '_', $string);

}

Link to comment
Share on other sites

  • 3 weeks later...

UPSXML has been working for me just fine for years until now. I have made no changes to my store nor to the contribution.

 

I believe the UPSXML module is not working correctly or UPS is not providing the correct quotes when requested by OSC. I am getting incorrect quotes on 2nd Day Air, Next Day Air Saver, Next Day Air and Next Day Air Early AM. I do not use 2nd Day Air Early AM so I do not know how it is performing with quotes. Ground and 3 Day Select seem to be ok. The difference in the amount of the misquoted items varies among methods of ship. For example for 2nd Day Air I am shorted about $0.78. The amount shorted increases a little more with Next Day Air and Saver, however, the amount is quoted higher than it should be with Next Day Air Early AM.

 

Versions of what I have are below.

Edited by alancwade

Production:
osCommerce V. 2.3.4BS
VPS Box

Link to comment
Share on other sites

I should state that I use Negotiated Rates and they have worked in the past just fine until recently. In post #2353 of this topic I gave my problem using negotiated rates. I use Customer Classification Code 01 and Pickup Method, Customer Counter and it use to work fine even though I do not have customer pickup.

 

Now, with further testing, here is what I come up with.

 

This following is with Customer Classification Code set to 01 with Pickup Method, Customer Counter.

I check negotiated rates to False, and I get the appearance of negotiated rates same as above in #2353 but not the exact UPS negotiated rates. But I should not be getting negotiated rates when set to false.

 

When I check Customer Classification Code set to 03 with Pickup Method, Customer Counter and negotiated rates set to False, I get retail rates correctly across all ship services.

 

When I check Customer Classification Code set to 03 with Pickup Method, Customer Counter and negotiated rates set to True and enter account number, I only receive retail rates and no negotiated rates.

 

My conclusion is that the Negotiated Rates stopped working.

 

Does anyone else have this problem? Please, I need help.

 

I am using UPSXML version 1.3.3

Edited by spiritalan

Production:
osCommerce V. 2.3.4BS
VPS Box

Link to comment
Share on other sites

Here is my answer to make this contribution work for me. After speaking with about 5 people in different departments with UPS and still waiting for an email answer from a more technical person whom I have not even spoken with, I conclude the UPSXML contribution needs an update.

 

I had said before in post number 2354 that I had negotiated rates, however, UPS people said I did not have that. The quotes that I had been receiving with this contribution before year 2013 were actually the Daily Rate quotes. Customer counter was selected with 01 customer classification code, Negotiated rates was set to True and I provided my account number. But the Daily rate quotes are not negotiated rates but published or book rates. It appears that when my use of UPS shipping decreased over a period of time (bad economy) UPS shifted me to a higher rate, Standard List Rate. They did not inform me about this change in rate quote and it may not be their practice to do so.

 

 

I downloaded UPS’s Rate Developers APIs and here is what I found from the Rating Package XML Developers Guide December 31, 2012.

 

The Valid Values for the Customer Classification Code are:

00- Rates Associated with Shipper Number;

01- Daily Rates;

04- Retail Rates;

53- Standard List Rates;

 

The following is the change that makes the UPSXML contribution work for me.

 

Backup the affected file.

 

Change the file: catalog/includes/modules/shipping/upsxml.php

 

Around line 384

Replace line:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Customer Classification Code', 'MODULE_SHIPPING_UPSXML_RATES_CUSTOMER_CLASSIFICATION_CODE', '01', '01 - If you are billing to a UPS account and have a daily UPS pickup, 03 - If you do not have a UPS account or you are billing to a UPS account but do not have a daily pickup, 04 - If you are shipping from a retail outlet (only used when origin is US)', '6', '6', 'tep_cfg_select_option(array(\'01\', \'03\', \'04\'), ', now())");

 

With this:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Customer Classification Code', 'MODULE_SHIPPING_UPSXML_RATES_CUSTOMER_CLASSIFICATION_CODE', '01', '00 - Rates Associated with Shipper Number, 01 - Daily Rates, 04 - Retail List Rates (only used when origin is US), 53 - Standard List Rates', '6', '6', 'tep_cfg_select_option(array(\'00\', \'01\', \'04\', \'53\'), ', now())");

 

Before you do the next item, you might want to print out your existing UPS settings.

 

In Admin, Modules, Shipping, United Parcel Service: REMOVE the existing UPS module.

 

In Admin, Modules, Shipping, United Parcel Service: INSTALL the UPS module.

 

You may now want to backup your new upsxml.php file.

 

Find out your UPS account rate. You can do this in two ways. (1) Do a Calculate time and cost mock shipment and at the top of the results it should say Retail or Standard or Daily or maybe even Negotiated rate. If you do not enter your account number in the calculation the default will be Retail. (2) Call you UPS account representative. If you don’t have one, get one.

 

I use Customer counter, so if you select something else you may get different results with different customer classification codes selected than what I got.

 

If you use Customer Classification Code 00, be sure to set Negotiated Rates to True and enter your account number.

 

If you select any Customer Classification Code other than 00, you do not need to set Negotiated Rates to True and enter your account number to get the appropriate rate. I don't know if it would work if you did. In my testing I kept Negotiated Rates to False and and did not enter an account number when I selected a Customer Classification Code other than 00.

 

What seems to be nice about code 00, the next time UPS makes a change to my rates, hopefully OSCommerce store and UPS online should sync like it is suppose to without making any further changes.

 

Final notes: I am not a programmer, so if I have missed something here, don’t be shy, let me know and others what needs to be done. Also, I am not a maintainer of this contribution but hopefully I have been able to help.

 

 

Alan :thumbsup:

Edited by spiritalan

Production:
osCommerce V. 2.3.4BS
VPS Box

Link to comment
Share on other sites

This is a followup to post #2356.

 

Watch for this possible text highlighted (red) difference in your upsxlm.php file to mine and make the correction; it should not change from your original, it affects sort order in the database.

 

Replacement line:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Customer Classification Code', 'MODULE_SHIPPING_UPSXML_RATES_CUSTOMER_CLASSIFICATION_CODE', '01', '00 - Rates Associated with Shipper Number, 01 - Daily Rates, 04 - Retail List Rates (only used when origin is US), 53 - Standard List Rates', '6', '6', 'tep_cfg_select_option(array(\'00\', \'01\', \'04\', \'53\'), ', now())");

Production:
osCommerce V. 2.3.4BS
VPS Box

Link to comment
Share on other sites

  • 2 weeks later...

Thanks Alan, worked great. I would like to reemphasize for people like me who rush through stuff:

 

Before you do the next item, you might want to print out your existing UPS settings

 

The only reason that the site I was working on didn't lose the ability to process UPS shipments for the weekend, at least, is because we have another site that uses OSC and the same UPS settings.

Link to comment
Share on other sites

  • 2 months later...

As I build an OSC 2.3.3 store I downloaded contribution UPS XML Rates and Services v1.4_0_1 by FIMBLE. To make it work correctly, I applied the fix found here in this thread’s post #2356

 

Alan

Production:
osCommerce V. 2.3.4BS
VPS Box

Link to comment
Share on other sites

  • 3 weeks later...

I downloaded the UPSXML_v1_3_92 Module.

 

I followed the instructions, and along with some posts in this thread I have it generally working on my test environment.

 

One problem I'm having is with shipping outside of the US. (my origin is in the US)

 

When I go to the UPS website and get a quote, I usually see UPS Standard as the cheapest option for Mexico. With this module, even though I have not checked any Disallowed Shipping Methods, I'm not seeing UPS Standard show up, just much more expensive ones like UPS Worldwide Expedited.

 

Is there a way to debug this or find out why?

Link to comment
Share on other sites

Having an issue with the latest version of UPS XML. The number of packages is not being calculated correctly.

 

Ex- Customer purchased 4 items at 5 pounds each; UPS calculates the correct weight to 20 pounds, but is quoting based on 2 packages, instead of 4.

 

Any ideas?

 

Thanks for any help!

Link to comment
Share on other sites

  • 2 months later...

@@kymation

Ok i need some help here..My website is pretty much ready to go but i'm kind of at a loss as to how to handle shipping..I have a brick and mortar store as well as the online site that i have developed so i am already set up to ship UPS..i have looked over the ups xml module and it is a little confusing to me how it works..if someone could please explain to me how it functions that would be great..what i mean is how does it calculate shipping? does it calculate only by weight? or do you need to have dimensions as well? or do you specify certain box sizes that it will use to calculate shipping? also i want to be able to offer free shipping at a certain price for small goods but not for oversized items..also some parts of the install are a little confusing to me..moving the new files over is easy and i understand that..but it also has SQL files that need to be added to the database..i've never done this before and have no idea how to do it..which file to i insert the SQL code to? or do i just move the whole SQL file somewhere..any advice on this would be greatly appreciated

Link to comment
Share on other sites

@@kymation

Ok i need some help here. . . what i mean is how does it calculate shipping? does it calculate only by weight? or do you need to have dimensions as well? or do you specify certain box sizes that it will use to calculate shipping? also i want to be able to offer free shipping at a certain price for small goods but not for oversized items..also some parts of the install are a little confusing to me..moving the new files over is easy and i understand that..but it also has SQL files that need to be added to the database..i've never done this before and have no idea how to do it..which file to i insert the SQL code to? or do i just move the whole SQL file somewhere..any advice on this would be greatly appreciated

 

I use it only for calculating weight only. The dimensional boxes support is optional and I have never installed or used it. As far as free shipping goes, UPSXML module is not that sophisticated to determine those kinds of modifications to your quotes to customer. However, as one person I know who offers free shipping with a certain amount of purchase and size, you can advertise it with a banner ad or something of that nature that you offer it limited and then if customer meets your criteria at time of purchase for free shipping, just refund them the difference. You can view his ad here at the bottom of his page http://iemusicstore.com

 

I don't know about other installations, but if you are using UPSXML V 1.3.3 for OSC 2.2, then read the readme.txt file of what you can understand and see if this helps clairify any of your questions. When the instructions call for you to install, you want to follow the instuctions to the letter in the order in which they are given. If this is still a blurr, you may need to have someone that is familiar with MySQL and PHP help you out.

 

After you have read the readme.txt file and are ready to install: One way to install the sql files is by the following: Go to your phpMyAdmin database administrator program on the database in question. Click on Import, then browse on your computer for the configuration_shipping.sql file you want to install, select it, make sure on Import the format is SQL, then click GO at the bottom, this will import and install the queries into your database. Also, for dimensional support you will install the install_upsxml.sql file the same way, Read dimensions.txt file. I cannot help you out with dimensional support because I do not use it.

 

After you install the contribution above, in order to get proper quotes, see my posts #2356 and #2357 in this topic thread for some needed modifications.

 

REMEMBER to Backup.

Production:
osCommerce V. 2.3.4BS
VPS Box

Link to comment
Share on other sites

I have done some looking, but can't seem to find an answer or don't know how to put in the query. Why do I get an error message from UPSXML that the province names are not legitimate states for shipments to Canada. I have my site working for FedEx and USPS, but not Canadian shipments on UPS. I have installed the latest UPSXML post.

JIm

Link to comment
Share on other sites

I keep getting this error. How do I fix. Quebec works with FedEx and USPS. Not sure if everything configured correct or not.

UPSXML Rates Error: 111286: Quebec is not a valid state for the specified shipment.

 

I really don't know the answer, but I will take a stab. When I have problems with similar errors it is because the Postcode and State do not match. Hope this helps.

 

Alan :-

Production:
osCommerce V. 2.3.4BS
VPS Box

Link to comment
Share on other sites

  • 3 weeks later...

I have done some looking, but can't seem to find an answer or don't know how to put in the query. Why do I get an error message from UPSXML that the province names are not legitimate states for shipments to Canada. I have my site working for FedEx and USPS, but not Canadian shipments on UPS. I have installed the latest UPSXML post.

JIm

I have an old version of oscommerce like whatever version I had installed prior to 2007 and the upsxml I "think" is v1.3.91 and I have had it calculate just fine. I'm using these abbreviations and codes in my database that sends to ups as: Hope its something this simple.

ON Ontario, BC British Colombia, AB Alberta, SK Saskatchewan, NS Nova Scotia and MB Manitoba. Thas all the provinces I have shipped to and it functions fine.

Hope this helps

Tom

Link to comment
Share on other sites

I keep getting this error. How do I fix. Quebec works with FedEx and USPS. Not sure if everything configured correct or not.

UPSXML Rates Error: 111286: Quebec is not a valid state for the specified shipment.

Posted for someone else above but here's the full list from ups.com, maybe you're spelling out the country but not using the country code as that would make it go "tilt".

Tom

Province

Code

Alberta, CA

AB

British Columbia, CA

BC

Manitoba, CA

MB

New Brunswick, CA

NB

Newfoundland and Labrador, CA

NL

Northwest Territories, CA

NT

Nova Scotia, CA

NS

Nunavut, CA

NU

Ontario, CA

ON

Prince Edward Island, CA

PE

Quebec, CA

QC

Saskatchewan, CA

SK

Yukon, CA

YT

Link to comment
Share on other sites

  • 3 months later...

I assume that part of the code needed for using the dimensions is installed correct but that the dimensions for the product are not queried. Possibly a query that wasn't updated to include the dimensions.

How do I accomplish this? My previously saved dimensions are not appearing upon editing...

Thanks!

Link to comment
Share on other sites

  • 4 weeks later...

hello,

 

oscommerce 2.3.3.4

 

i just updated the site.

 

i received this error

 

UPSXML Rates Error: 110000: XML Rating and Service Selection Service Unavailable experienced by customer with id

 

any ideas?? UPSXML Rates Error: 110000

 

 

thanks

craig

Link to comment
Share on other sites

I also have a MVS client with the same error today.

 

The items listed above will be shipped via:

United Parcel Service (XML) United Parcel Service (XML)

110000: XML Rating and Service Selection Service Unavailable

Link to comment
Share on other sites

I have tested this a few times, and it sometimes returns quotes and sometimes fails with the above message. This is probably due to the volume of Holiday shopping. Not much of a comfort for the stores that are missing sales.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

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