Thank you Ajeh,
To all searching for a UPS ODBC integration to UPS World Ship 2009 v11, here is what I did:
*****Note******
World Ship must already be installed on a windows PC that has tcp access to your database server port 3306. UPS has WorldShip available for free from your online account tools. From a security standpoint, I would not probably try this across the Internet unless your host offers SSL connections and can firewall access to the database server port 3306 to allow only connections from your single world ship IP address. If your DB server is on your Lan, then you can manage the security directly.
***************
1. Add a read only user to your zen-cart database. This will allow you to create a System or User DSN on the PC with World Ship installed.
2. On the PC with World Ship installed download the MySQL ODBC v 3.51 connector (the newest one causes and exception in worldship) from http://dev.mysql.com/downloads/connector/odbc/3.51.html Install this.
3. After the MySQL ODBC Driver install go to Start -> Control Panels -> Administrative Tools -> Data Sources (ODBC). Click on the System DSN tab and click Add... Select the "MySQL 3.51 ODBC 3.51 Driver" and Click Finish.
In the Connector/ODBC window enter the following:
Data Source Name: ZENCART
Description: [Whatever you want]
Server: [IP Address of your DB Server]
User: [The read only account you just made in step 1]
Password: [just what it is]
Test the connection.
4. Follow the instructions in the document titled "Import Shipment Data Using the ODBC Feature and Keyed Import" found here: http://www.ups.com/content/us/en/res...nts/index.html
This is fairly straight forward except on step 4, you will select "By Known ODBC Source" instead of "By File" like the instructions. You only need to enter the name of your "Data Source Name" from step 3 in the "Data Source Name (DSN):" box if you entered the username and password in step 3.
Complete the rest of the instructions as described in the UPS Document.
5. If you want to add the total shipping weight (without the tare corrections, i.e. small to medium package 10:1) to the import you will need to run this command from either the mysql command line or the sql patches:
**** NOTE ****
BE SURE TO CHANGE "prefix" IN THE FOLLOWING COMMAND TO WHATEVER YOUR TABLE PREFIX IS
*************
Code:
alter table prefix_orders add shipping_weight_total decimal(14,5);
Then edit your /includes/classes/order.php on line 613 where it reads:
Code:
'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR']
);
change it to this:
Code:
'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR'],
'shipping_weight_total' => $_SESSION['cart']->weight
);
Once this is done you will need to edit the map in world ship by clicking on Import/Export Data -> Create / Edit Map... and selecting the map you made above. Just connect the shipping_weight_total to the appropriate WorldShip weight field.
Now in WorldShip just go to Import/Export Data -> Keyed Import -> More... and select the new map you created. It will prompt you for an order id then fill in all the fields for you. You can also set this up to automatically print the labels on new orders (Hands-Off Shipping), but I would get very comfortable with this hack before doing this.
Good Luck, I hope this helps someone else. If there is a way to override the order.php file I would recommend doing so, but I am pretty new to this so I'm not sure where I should put it.
Thanks,
-Cory
Bookmarks