View Single Post
  #1  
Old 09-05-2005, 12:22 PM
 
bobbyftk bobbyftk is offline
 

Senior Member
  
Join Date: Jun 2005
Posts: 167
 

Default UPS Worldship - orders import & custom worldship setup.

This has been tested for 4.0.14

This will setup a nice CSV (I've tested it with the comma delimited option) file, for import into UPS Worldship.
Since UPS Worldship needs headers with no spaces, this first part is mainly a mod to create those headers in the correct format.

Partial credit to member "eleven" for posting the 1st step in this mod and leading me on the right path.

Create a new file called /skin1/main/orders_export_hdr.tpl

click here for the code for orders_export_hdr.tpl (link, so the length of the code doesnt throw off the width of the whole thread)
http://www.ftkonline.com/mods/orders_export_hdr.txt


then in /include/orders_export.php add the line: (note orders_export.PHP not .TPL!)

Code:
func_display("main/orders_export_hdr.tpl",$smarty); echo "\n";


right before

Code:
foreach($orderids as $orderid_item)


This will make the headers nice and neat and arranged properly.
Now in UPS Worldship, you need to create maps for import. This CSV file i've created is for Address Book import. This way I map the order ID as the customer #. So in Worldship i enter the order ID and boom the shipping address, phone, email, all populate with the exact data the customer entered on the order (shipping address of course)

One other step is the Shipping Name. Since Worldship doesnt merge s_firstname and s_lastname, you need to do the following for the xcart export to do this merge for you.

in main/orders_export.tpl

replace this code (there are 2 instances of this exact code in the same file, replace both)
Code:
{$delimiter}{$orders[oid].s_firstname}{$delimiter}{$orders[oid].s_lastname}{$delimiter}



with this code
Code:
{$delimiter}"{$orders[oid].s_firstname|replace:"\"":""} {$orders[oid].s_lastname|replace:"\"":""}"{$delimiter}


Now this will merge s_firstname + s_lastname in the same cell. It takes up the space of where s_firstname used to be. s_lastname remains in another cell by itself, but in Worldship just map s_fullname, and you dont need to worry about s_lastname at all.

So now when you do an export from the orders managment area, (in comma seperated form), the orders.csv file will be perfect for importation into UPS Worldship. (is importation a word? sounded right to use )



UPS Worldship Setup.


Here is how i do the import, and how i have UPS Worldship set-up. You may or may not want to set it up like this but i figured i would show you how it saves me HOURS of data entry.

I create a folder on my local drive called "Orders Export"
This where all the exported CSV file resides after downloading it from X-Cart.

Open up UPS Worldship. Click on the UPS Online Connect menu.
Choose "Connection Assitant"

on the next screen choose "Creat New Map For Import"

on the next screen ADDRESS BOOK should be selected by default in the drop down menu. If it not, then select ADDRESS BOOK.

hit Next >

choose "By File" when asked "Select the datasource"
You will then have to browse for the orders.csv file you exported earlier. You may have to choose "all files" in the browse pop-up for the orders.csv to show.
Please note that this should be in a place where future exports will be saved, because once you save this "map" Worldship will look for the same exact file and location upon future imports.

choose "Microsoft Text Driver (*.txt, *.csv)" from the ODBC Drivers list.

Also enter a name in the upper right hand area Data Source Name "DSN"
this is whatever you want this import map to be called, i just use
"xcart_orders_import"

hit Next>

Choose "New Map"
and name your map. I use the same name as above
"xcart_orders_import"

hit NEXT >

in ODBC text setup, you shouldnt have to change or check anything here.

hit NEXT >

This will be where you map the different values to be imported. Again this is how I do it, you may have a way that better suits your needs. this is how i set mine up.

I highlight the Order ID on the left hand column, and hit the PRIMARY TABLE button, as well as the DEFINE KEY button.
To be completely honest, im not sure what this exact does. but i figure the order ID is what will determine everything I import so using that as the define key sounds logical and seems to work fine!

Now you can start mapping everything from the left column to the corresponding key on the right.

I select ORDER ID (left) and customer id (right) and hit CONNECT.
Then just go down the line, most of the others are self explanatory.

s_fullname (left) and Name or Company (right) and hit CONNECT,
and so on...

You can even map the email to be imported and setup Worldship to automatically send out the tracking number once the order is processed. (Sweet!)

Once you map everything you want to be imported. Hit OK.

I believe at this point it will ask you if you want to go ahead and do the actual import.
You can hit YES, assuming you have your CSV file exported and all that.
Or you can hit NO, and import it later.
It doesnt matter since the "Map" you created still exists and can be used at any time now!



Do do an import after setting up the map.

In UP Worldship.
Click the UPS Online Connect, and choose "Batch Import"

You should now see a list of maps, and the one you created previously should be listed.

Select that map.

Below there are some options. be SURE to check "DO NOT USE CITY, STATE, POSTAL/ZIP CODE VALIDATION"
i also usually check "Overwrite excisting records" so its always replaced with the newest data.

then hit NEXT >

It will then import all the records from your CSV file.



using Worldship to ship out orders using all your newly imported information.

The basic way it works is just enter the order ID into the "Customer ID" field, hit TAB and BLAMMO! all of the exact customer ship -to info is filled in for you.

First time this worked, i couldnt help but punch myself for not knowing how to set this up sooner. It saves HOURS everyday.

Another really helpful feature in Worldship is the Profile Editor. Here you can create a profile to use for your shipments.
I always use one i called "normal"

Here i have it default to Ground as the service type. I have the reference number selected as a necessary field (wont let you ship the package without having something entered in Reference #1, which i use to put the order # in)
I also have it setup to automatically enter the customers email address for Quantum Notify (for shipped and exceptions).
And then the nice feature is setting the TAB ORDER.
I set this to this order for the 1st three.
Customer ID
Reference #1
Weight

So i just enter the order ID (in the customer ID field) TAB >
Order ID again (reference #1) TAB >
enter weight and then F10 (print)
and i'm done!!!

When you have 100-300 packages going out a day, this saves A TON OF TIME.
not to mention the automation of emailing tracking numbers to customers, and being able to eliminate the human error element when manually entering shipping addresses.

all around an awesome tool to have in effect.

hope this helps some people!!!
__________________
4.2.2
Reply With Quote