Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

UPS Worldship - orders import & custom worldship setup.
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #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
  #2  
Old 09-07-2005, 01:02 PM
 
pengrus pengrus is offline
 

eXpert
  
Join Date: Feb 2004
Posts: 359
 

Default

Thank you very much.... Looks like a very powerful yet simple mod to apply. Thanks for sharing.
__________________
x-cart 4.1.8 Gold
Linux
Reply With Quote
  #3  
Old 10-10-2005, 12:42 PM
 
sacha sacha is offline
 

Newbie
  
Join Date: Jun 2004
Location: San Diego
Posts: 2
 

Default

thats awesome. thanks.
__________________
Beau Bennett
THECLIP.COM
X-cart version 4.0.1
Reply With Quote
  #4  
Old 01-08-2006, 04:36 AM
 
perfphysio perfphysio is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 49
 

Default header code for csv export

This was most excellent. I just used it in version 4.0.17 and it works a treat. Mind you i just did it for the actual general csv export so my providers understood each column heading.

Thanks for the great work
__________________
Thanks Perfphysio
X-Cart version 4.0.17
PHP 4.3.10
MySQL server 3.23.58
MySQL client 3.23.58
Web server Apache/2.0.51 (Fedora)
Operation system Linux
Perl 5.008003
Reply With Quote
  #5  
Old 01-29-2006, 04:17 PM
 
gardel gardel is offline
 

Member
  
Join Date: May 2004
Location: San Francisco
Posts: 20
 

Default

I'd love to get this working on a pre-version 4 x-cart install (3.57 to be exact). I figured out that the replace in main/orders_export.tpl is a bit different (specifically, s_firstname and s_lastname in both the search and replace strings need to be changed to firstname and lastname).

The other issue I ran into is that the code in /include/orders_export.php (specfically: "func_display("main/orders_export_hdr.tpl",$smarty);") returns an error. I am guessing func_display is not avaialble on the smarty version in earlier x-carts.

Any replacement suggestions? Thanks.
Reply With Quote
  #6  
Old 07-19-2006, 07:49 AM
 
gilman01 gilman01 is offline
 

Advanced Member
  
Join Date: Sep 2003
Posts: 34
 

Default

I'm attempting to integrate the WorldShip Mod posted in this thread but I am running into problems and was wondering if someone might offer some assistance.

I followed the mods as listed (and verified the changes do exist on the server).

When I export to the orders.csv file I login to my store admin - go to orders screen and click on Export All button (with tab delimited CSV)

The file exports fine. I go to the WorldShip program and attempt to create a new map. It works perfectly until I start to create the map. In the Edit Import Map Screen of WorldShip on the ODBC side it appear all the field names are contained on one line (that is it appears like orderid_productid_productcode_ etc...) Shouldn't these items be listed individually?

When I look at the csv file in a text reader it appears the fileds are showing up tab delimited. Am I missing something when I do the mapping process in WorldShip? Or might there be a problem exporting the items from Xcart?

I am using WorldShip Version 8 (which appears to work the same as earlier versions with regard to mapping) and Xcart Version 4.0.18

This is driving me crazy - I've read every possible UPS / WorldShip thread there is in the forum and can't seem to resolve this.

If anyone might have any suggestions that could help I would greatly appreciate hearing them.

Jeff Hoffman
The Gilman Group
--------------------
X-Cart Gold Version 4.0.18 [Unix]
Reply With Quote
  #7  
Old 04-10-2007, 11:51 AM
 
robin robin is offline
 

Member
  
Join Date: Aug 2005
Location: Wilmington, NC
Posts: 13
 

Default Re: UPS Worldship - orders import & custom worldship setup.

Has anyone gotten this to work in 4.1?
__________________
X-cart Version: 4.1.3
PHP Version: 5.1.6
MySQL: 3.23.58
OS: Linux
Reply With Quote
  #8  
Old 06-05-2007, 09:14 AM
  2coolbaby's Avatar 
2coolbaby 2coolbaby is offline
 

eXpert
  
Join Date: Sep 2004
Location: TN moving to FL
Posts: 265
 

Default Re: UPS Worldship - orders import & custom worldship setup.

Quote:
I'm attempting to integrate the WorldShip Mod posted in this thread but I am running into problems and was wondering if someone might offer some assistance.

I followed the mods as listed (and verified the changes do exist on the server).

When I export to the orders.csv file I login to my store admin - go to orders screen and click on Export All button (with tab delimited CSV)

The file exports fine. I go to the WorldShip program and attempt to create a new map. It works perfectly until I start to create the map. In the Edit Import Map Screen of WorldShip on the ODBC side it appear all the field names are contained on one line (that is it appears like orderid_productid_productcode_ etc...) Shouldn't these items be listed individually?

When I look at the csv file in a text reader it appears the fileds are showing up tab delimited. Am I missing something when I do the mapping process in WorldShip? Or might there be a problem exporting the items from Xcart?

I am using WorldShip Version 8 (which appears to work the same as earlier versions with regard to mapping) and Xcart Version 4.0.18

This is driving me crazy - I've read every possible UPS / WorldShip thread there is in the forum and can't seem to resolve this.

If anyone might have any suggestions that could help I would greatly appreciate hearing them.


Me too. The same as gilman01. Has anyone figured out why this would happen. My file is tab delimited, but it shows up all runtogether as 1 column in UPS worldship. Any ideas????
__________________
Mary Lee
-------------------
Dinner and a Murder Mystery Games
http://www.dinnerandamurder.com

x-cart version 4.7.5 / Mac OS 10.10.5 and Windows 8/10 sometimes - Ideal Responsive Template
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:59 AM.

   

 
X-Cart forums © 2001-2018