Jump to content
Nelly111s

Export order detail as csv

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

 

Share this post


Link to post
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.

 

  • Like 1

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

The module discussed above gives you what you want. Send a PM with your email address and I will attach it to a reply.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...