Jump to content

Export order detail as csv


Nelly111s

Recommended Posts

I'm looking to "improve" on the Sales report, so that each sales record has the line items and cost of each line as well as all the current info. This is so that I can import the information into my accounts package (Quickbooks) and match it with the payment record. I'd like to be able to export the data as a csv file for upload. I've seen a few references to this with a quick search, but no example that I can see. Can anyone point me in the right direction?

 

Thanks

 

Link to comment
Share on other sites

For CubeCart 3, I have experience creating an exporter that creates a QB IIF file. It worked well enough. (Note: the IIF file has its own format and requires an enormous amount of in-line processing.)

I think the CC6 version of exporter methodology is better suited to create the QbXML file.

Recent conversations dealt with a custom module that solved specific requirements. That's why there isn't a "complete" exposition on how to do this.

Also, there aren't any development documents to be had. However, the /modules/external/sage module is a decent place to explore.

We can take this as far as you need by email.

 

Link to comment
Share on other sites

Thanks for the quick reply. And sorry for the slow response!

I've solved the problem (mostly)! 

I used phpMyAdmin to run the following two queries.

SELECT
    T1.cart_order_id,
    first_name,
    last_name,
    order_date,
    T2.product_code,
    T2.name,
    T2.quantity,
    T2.price,
    T2.tax_percent,
    T2.tax,
    ship_date,
    subtotal,
    total
FROM
    CubeCart_order_summary T1
INNER JOIN
     CubeCart_order_inventory T2 ON T1.cart_order_id = T2.cart_order_id
WHERE
    T1.id > '652'
    

SELECT
    cart_order_id,
    first_name,
    last_name,
    order_date,
    ship_date,
    shipping,
    shipping_tax,
    shipping_tax_rate,
    total
FROM
    CubeCart_order_summary 
WHERE
    id > '652'
 

These two, when run can PhpMyAdmin can these be exported as csv files. When the two are combined in one file (Numbers or Excel) and exported as a csv, give me a file that can be imported to Quickbooks (I use QuickBooks Online (QBO)) which creates Sales Receipts in QBO. These Sales receipts have are numbered using the Cubecart order number, so it's easy to cross-refer the two.

Ideally I'd like to "automate" this a little more so that I can run it from inside Cubecart and produce a csv automagically, rather than logging in to phpMyAdmin each time. My knowledge of php is thin, so this may, or may not, get done depending on it's complexity. 

Link to comment
Share on other sites

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...