Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

[SOLVED] Export orders
 
szotyi
Sr. Member
 
Total Posts:  153
Joined:  2008-11-29
 

at the first page of these thread you can find the answer (list.txt)

 
Magento Community Magento Community
Magento Community
Magento Community
 
adnymarc
Jr. Member
 
Total Posts:  2
Joined:  2009-03-05
 

szotyi,

Thank you very much for all your hard work. I just had to develop a store on a very quick turnaround time and chose Magento. It was only after most of the work was done that I found out how hard it was (impossible) to get the shipment data out. Your solution is going to be great.

I was wondering if you would mind posting the most recent revision of your files. I’ve noticed that many changes/updates have been made in this thread and would like to start as up-to-date as possible. Maybe this could even become an extension. Either way I would love to get a hold of the latest and greatest version and get it running for the site I’ve been working with.

Thanks again,

Andy

 
Magento Community Magento Community
Magento Community
Magento Community
 
szotyi
Sr. Member
 
Total Posts:  153
Joined:  2008-11-29
 

Hello adnymarc,

Sorry I do not have any newer version. The 80% of the changes I did it by head, the rest of it I did not even saved…
But do not worry you do not miss a lot, the changes are usually just customized things…

Enjoy it,
Szotyi

 
Magento Community Magento Community
Magento Community
Magento Community
 
jakilcz
Jr. Member
 
Total Posts:  14
Joined:  2008-09-01
 

It’s usefull but from code side it’s total mess…
I’ve added original files with changes that make step 4 not needed anymore.
Which is very important as otherwise you block very important functionality of magento.

(update) sorry there was still error in files (won’t work id exports.xml wasn’t existing) now it’s fixed too.

File Attachments
export.php  (File Size: 6KB - Downloads: 586)
includes.php  (File Size: 10KB - Downloads: 281)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Paulus
Guru
 
Total Posts:  335
Joined:  2008-07-21
 

Good stuff, we’re making a TNT export module right now for mailcenter (Dutch shipping). However I do need to know how I can implement a type field inside the XML. I tried this:
address type="RETURN"

but it shows this:
<addresstypeRETURN>

Cheers, will post the code when done.

Here’s the code that it needs to be later when done.

<?xml version="1.0"?>
<shippingset>
  <
shipping sequence="15168">
    <
address type="SHIPPING">
      <
name1></name1>
      <
name2></name2>
      <
name3>/</name3>
      <
streetname></streetname>
      <
streetnr></streetnr>
      <
streetnrext></streetnrext>
      <
zipcode></zipcode>
      <
location></location>
      <
region>?</region>
      <
country-code>AT</country-code>
    </
address>
    <
shippingdata>
      <
product-id></product-id>
      <
weight>80</weight>
      <
franking>PB_7</franking>
      <
insured-amount>62.7</insured-amount>
      <
value-amount>62.7</value-amount>
      <
increased-liability>62.7</increased-liability>
      <
label>AGTG</label>
    </
shippingdata>
    <
colli>
      <
collo>
        <
index>1</index>
        <
barcode></barcode>
        <
referencetext></referencetext>
        <
contenttext></contenttext>
        <
ordernrtext>15168</ordernrtext>
        <
featuretext></featuretext>
      </
collo>
    </
colli>
    <
address type="RETURN">
      <
name1>Ltd.</name1>
      <
name2></name2>
      <
name3></name3>
      <
streetname>Postbus</streetname>
      <
streetnr>942</streetnr>
      <
streetnrext></streetnrext>
      <
zipcode></zipcode>
      <
location></location>
      <
region></region>
      <
country-code>NL</country-code>
    </
address>
  </
shipping>
</
shippingset>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Periculi
Sr. Member
 
Total Posts:  249
Joined:  2009-02-03
 

This is a very confusing issue, because all the orders/invoices/shipment datagrids could be given the little export to csv/xml function built into the admin without too much extra effort it looks to me.  So why all the fuss for a special order export method?  Wouldn’t it be simpler to use the built in methods in magento, and if you needed a special format for any given data table a module that allow you to configure a table to display would be more handy I would imagine.

Look at how TBT Enhanced Products grid module added an Export to CSV/XML button to the product listing grid - they implemented the export method through the built in getCsv(); in the controller and since you can customize the tables to display a lot of other data it becomes a very handy tool!

So, I suppose the next step will be for me to example you with a little proof of concept.  Coming soon (as soon as I figure out how to package these community extensions better).

 
Magento Community Magento Community
Magento Community
Magento Community
 
gibbo_oz
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2009-02-28
 

We are accounting integration developers in Australia working extensively with business management software developers and have been asked to consider developing an integration to MYOB from Magento.
The issue we find is not so much getting the orders out, it is more that the information you need is not necessarily available from the tables. Would appreciate some comments on what we are looking at developing.
First step is to add some small tables in Magento that would be populated from the MYOB lists. This makes available in drop-down lists the data you actually need to write back to MYOB. Second is to add these drop-down lists into existing tables where required so that they can be set up to provide “...and this is what it is called in MYOB”. Would then envisage a set of three Order Export Tables - SaleHeader, SaleLines and SaleCustomer. These would be populated from order data and this allows total flexibility on what is passed out. We would need to work with the web developer as well as the client to ensure the tables contain what is required and leaves out what is not.
The data could either be exported from these Export Tables as XML or a text file, or the application could simply connect to these tables (which is what I favour). The last thing is a set of tables and parameters in the import application to pick up things such as Customer terms (which for MYOB is mandatory on order imports), Delivery Status and Sale Layout as well as determing whether to import as Sales Orders or as an Invoice. This structure allows us to have total flexibility from a single set of code, with the information being passed out configured to provide exactly what is required and the Aplication setting the parameters and providing the other data.
Every Accounting program has its own peculiarities and it is understanding these that is the biggest hurdle to integration as often it is not quite as simple as simply taking an exported piece of data and passing it through.
With some variation in the table structure, this could also be used to import into any accounting program. We have done other work with QuickBooks in the US and with Sage in the UK and both these would be equally achievable.

 
Magento Community Magento Community
Magento Community
Magento Community
 
srinigenie
Guru
 
Avatar
Total Posts:  539
Joined:  2008-02-04
 

For those who would like to pay and get an extension, have you guys checked this out?

http://www.magentocommerce.com/extension/980/magento-order-export-module

 
Magento Community Magento Community
Magento Community
Magento Community
 
kdouglas
Jr. Member
 
Total Posts:  3
Joined:  2009-01-06
 
kdouglas - 21 January 2009 02:30 AM

Great work and thank you very much, I’ve just spent a few days testing this and have now put in on our production server.

I also made some minor modifications and wrote a php script which generates a pdf file from the xml output, I’ve replaced the xml download link with a link to this pdf generation script.

If anyone is interested in it PM me and I can give you a copy.

(I will post it on-thread in a few days when I get a chance to tidy the code a little)

Got side tracked and never got back to post this, my modified export mod (with PDF export) is available at; http://kdouglas.ie/export_pdf.zip

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paulus
Guru
 
Total Posts:  335
Joined:  2008-07-21
 

No info on my questions for the extended xml tags? I would really appreciate it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
paellaco
Jr. Member
 
Total Posts:  2
Joined:  2008-07-30
 

I have managed to get it to work, but where can I find the full list of variables avaialable to create the XML file in samples.php

 
Magento Community Magento Community
Magento Community
Magento Community
 
msn
Jr. Member
 
Total Posts:  3
Joined:  2007-09-05
 

hey,

thanks a lot!
it works just fine smile

I’ve added small modifications and packed all required files
to install just unpack, set write permissions on export folder and clear cache

no core files changed, so it won’t break your shop, hopefully wink

File Attachments
order_export.zip  (File Size: 12KB - Downloads: 604)
 
Magento Community Magento Community
Magento Community
Magento Community
 
CodeSwitch
Member
 
Total Posts:  32
Joined:  2008-10-29
 

Nice Tool.

But is there a way to export everything as a csv-File for excel?
I’d like to have:
CustomerID
Name, Address
SKU
Amount
Price
Tax
Currency

You’re so enthusiastic, I’d really appreciate it if you’d help me out!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vilpenstylen
Member
 
Total Posts:  54
Joined:  2008-05-29
 

Thanks msn, I tried your package but there’s something slightly off as I get an error when I press Export:

“The requested URL /magento/admin/sales_order/ was not found on this server.”

Perhaps it’s because i don’t have mod_rewrite enabled on my testing server? I’ll look into it if it’s anything else. At least the url should have the index.php after /magento/.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vilpenstylen
Member
 
Total Posts:  54
Joined:  2008-05-29
 

Ok got it fixed with enabling rewrites, seems to work ok! Thank you very much.

Now I just have to look into transforming the ouput into a usable format.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top