Home » Forums » Support » QuickBooks Integration

Was this information Helpful?

This is G o o g l e's cache of http://www.ubercart.org/forum/quickbooks_integration/1647/export_data_qbxml as retrieved on Aug 3, 2007 00:34:25 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:vufFnbrzJIgJ:www.ubercart.org/forum...

Google is neither affiliated with the authors of this page nor responsible for its content.
These search terms have been highlighted: 08 01 2007

--------------------------------------------------------------------------------

Ubercart
Home
Documentation
Forums
Issues
Livetest
Home » Forums » Support » QuickBooks Integration
Export data to qbXML?
Submitted by skeftomai on Wed, 08/01/2007 - 20:22
skeftomai
Posts: 7
Joined: 06/29/2007

Would it be possible to export data from Ubercart's database tables, output in qbXML format (making it so customers could download the data as an XML file), then the cutomer imports this file into QuickBooks? Can a qbXML file even be imported into QuickBooks?

Add new comment
permalinkThu, 08/02/2007 - 07:34
Shawn Conn

Posts: 33
Joined: 02/18/2007

I know this is on Ubercart's todo list. You should talk to Ryan about technical details.

reply
permalinkThu, 08/02/2007 - 08:43
Ryan

Posts: 1685
Joined: 09/26/2006

I have a qbXML class from days gone by that would take an array and turn it into valid qbXML... but it needs to be updated and then integrated w/ Ubercart. You could just dump the qbXML into a file for download and use a tool from the SDK to import the data... but the more correct way is to setup the QuickBooks Web Connector and have that connect to your site then process the qbXML directly. This is the approach Ubercart will be taking.

reply
permalinkThu, 08/02/2007 - 14:02
skeftomai
Posts: 7
Joined: 06/29/2007

Hmm, so it the Web Connector generic enough to handle any XML file? Or would you have to write your own app that uses Web Connector? I'll look it up myself, just asking in case I don't figure it out

reply
permalinkThu, 08/02/2007 - 14:38
Ryan

Posts: 1685
Joined: 09/26/2006

The following is an unedited version of the e-mail I normally send to folks requesting the code. It's kind of silly for me to keep e-mailing it individually... the code isn't that great, but it's functional. I'll be rewriting this to build a SOAP Server into Ubercart for QuickBooks integration. Original description:

The code attached includes the following:

/lib/ contains a modified version of NuSOAP to work with PHP 4/5.

/include/XML2Array.php is a class from php.net that parses an XML
document for you.

qbis_update.php is the SOAP server that I point my QWC file to... it
includes a few defines for logging purposes and two functions to
manage the logs (one to write to it, one to truncate data that I'm
writing to it so it doesn't fill the browser with a 10 page array).
In the code, I'm bootstrapping into the application I wrote, and so
all the variables in the $settings array are from that program's
settings. Function receive_response_xml() looks for a function in the
application to handle the response type it receives. In these
functions is where I make necessary adjustments after an action has
successfully been imported/completed. Line 245 is really all it takes
w/ NuSOAP to parse and return the XML.

modules/qbxml.module is a module I coded for my application to handle
the qbXML. It contains a class that can be pulled out of here that
translates an array (with a name and argument data) into the correct
qbXML. It has some helper functions built into it as well. So, to
add a customer, I would execute something like the following:

$action_name = 'CustomerAdd';
$action_data = array('Name' => qbxmli($custname, 41),
'CompanyName' => qbxmli($billing_company, 41),
'FirstName' => qbxmli($cdata['customers_firstname'], 25),
'LastName' => qbxmli($cdata['customers_lastname'], 25),
'BillAddress' => $BillAddress,
'ShipAddress' => $ShipAddress,
'Phone' => qbxmli($odata['customers_telephone'], 21),
'Email' =>
qbxmli($odata['customers_email_address'], 1023),
'Contact' => qbxmli($contact), 41);

queue_add_action ($action_name, $action_data);

This adds a row to my action_queue table with that action_name and the
serialized array in action_data. The qbxml.module can retrieve that
data whenever it wants and translate it into qbXML. You can see where
this happens in sendRequestXML() in qbis_update.php.

Attachment Size
qbis.zip 201.69 KB