5/19/2006
DHL Shipping Automation For ZenCart
DHL EasyShip allows you to easily automate shipping processes. EasyShip allows a user to weigh a package, supply destination information and print a pre-paid package slip. The EasyShip tools communicate with DHL's servers over the Internet to rate and purchase the service and can notify them a local pickup is ready. The system can also communicate with a third party database via ODBC to pull the destination address and can writeback simple fields such as a tracking number.
In order to integrate EasyShip into a ZenCart store, I created a table with the following schema:
orders_id int(11) NOT NULL DEFAULT '0',
ship_package_t_stamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
ship_package_tracking varchar(50) NOT NULL DEFAULT '',
ship_track_status varchar(10) NOT NULL DEFAULT 'NEW',
PRIMARY KEY (orders_id)
)
In EasyShip we created a writeback operation and mapped the package tracking number to the ship_package_tracking field. For every package shipped through this system now, EasyShip INSERTs a new row containing the ZenCart orders_id and DHL's tracking number for the shipment.
Using my PHP crontab system, I created an hourly job to query the orders_shipping table for new shipments. The automated job, updates the order status to SHIPPED, inserts a new comment for the order containing the tracking information and link to DHL's site and generates an email to the customer with the information.
I would recommend a similar system for anyone running a medium to high volume shop. It has proven to be a huge timesaver for the clients I have implemented it for.
Related Link: DHL services from Parcel2Go
Popularity: 34%


