Latest News: (loading..)
dlan

Export orders into csv

110 posts in this topic

Isn't that just because the size of the field is too small? So when you expand it the full number appears? I just noticed that happening in Excel and haven't read the previous posts so maybe you and I are talking about two completely different things - (if so sorry :) )

 

Telephone no as 4E+07. you enlarge excel filed it reads OK. But I use mail merge function of MS word to create shipping labels. Telephone NO shows 4E+07 in word.

by the way how do you use this order data?

Share this post


Link to post
Share on other sites

I have this contribution working for me and am happy about it. I have the product attribute option type feature and I need the information typed in by others in the fields for their orders. How do I pull these into the csv file? I'm obviously not a php expert and can really only about cut and paste.

Share this post


Link to post
Share on other sites

Hi there.

This contribution is great and I have been using it a lot. My problem is that when people add commas to their addresses it creates all kind of problems when I import it in to a different database. Is there a way of preventing people from being able to do that, either by doing something to the form not to accept commas or to the the database itself?

Any help would be appreciated.

Share this post


Link to post
Share on other sites

I did nothing. It suffenly stopped to work today. I read thread here.

In php.ini under root I changed to register_globals = off

what does this mean, is register_globals = off going to affect something else stop to work?

Share this post


Link to post
Share on other sites
In php.ini under root I changed to register_globals = off

It's not a register_globals issue. Internet connection from My PC to my Europe web server has problem so this addon became instable. chinese ISP is the most stupid in the world except Cuba & North korea.

Share this post


Link to post
Share on other sites

Hi - thanks for this great contribution - it was just what I was looking for!!!

 

I have one question:

 

Is it possible to get the spreadsheet to export with a header line (column titles)?

 

Thanks

Sol

Share this post


Link to post
Share on other sites

Hi - thanks for this great contribution - it was just what I was looking for!!!

 

I have one question:

 

Is it possible to get the spreadsheet to export with a header line (column titles)?

 

Thanks

Sol

Share this post


Link to post
Share on other sites

Hi Please can you help me. I've installed the lastest version however when I download the CSV file it does not have anything in the Shipping Address Line 2. How can I add this function?

Share this post


Link to post
Share on other sites

It seems not many people using this contribution because the forum support is very sparse...

 

I would love to know how the fields can be altered!

 

Specifically, I would love to add header titles. And how to move the output columns around ? I've tried working on this and it is not obvious at all.... any experts out there who can tell me how to re-arrange the output?

 

Thanks

Edited by ssnb

Share this post


Link to post
Share on other sites

Exactly how do you install this thing besides copying in the admin folder?

 

I can't see any newly added button in my admin.

Please help with this! :(

Share this post


Link to post
Share on other sites
It seems not many people using this contribution because the forum support is very sparse...

 

I would love to know how the fields can be altered!

 

Specifically, I would love to add header titles. And how to move the output columns around ? I've tried working on this and it is not obvious at all.... any experts out there who can tell me how to re-arrange the output?

 

Thanks

 

Totally agree, that's actually why I'm here :( I'm not fussed (yet) about the column order but field names / column headings would be great!

Share this post


Link to post
Share on other sites
Totally agree, that's actually why I'm here :( I'm not fussed (yet) about the column order but field names / column headings would be great!

 

Actually part of the problem is that the order to product relationship is a one to many (one order may have multiple products), but the csv result is a one to one (i.e. one line per order containing all product and customer details). So field names are obvious for the customer details but once you get further across you'd have to have things like product1, product2, product3 and so on which aren't actual field names in the database. So not quite as simple as it initially looks (to me anyway).

Share this post


Link to post
Share on other sites
Actually part of the problem is that the order to product relationship is a one to many (one order may have multiple products), but the csv result is a one to one (i.e. one line per order containing all product and customer details). So field names are obvious for the customer details but once you get further across you'd have to have things like product1, product2, product3 and so on which aren't actual field names in the database. So not quite as simple as it initially looks (to me anyway).

 

It is possible to have column headings and to have say customer details on one line and the items on individual lines below that. I've modified this to suit my needs, so it should be possible to do whatever you want. I can give you my code if that will help?

Share this post


Link to post
Share on other sites

Hello guys!

I'm using the export order to csv contrib from this link that was also derived from this original addon:

http://www.oscommerce.com/community/contributions,4728

 

I really like this contrib because of the neat output, all columns are properly labeled and an option to output in CSV or HTML

However I'm having trouble making it work, all it does is refresh the page and no files are generated.

 

Is this a problem with MS2 and RCA version compatibility? Or just a problem in the code? Also it's hard coded but even manual changing the link gives more error.

 

Please I really need it, so I need all help so guys can offer.

Thanks a lot!

Share this post


Link to post
Share on other sites
Hello guys!

I'm using the export order to csv contrib from this link that was also derived from this original addon:

http://www.oscommerce.com/community/contributions,4728

 

I really like this contrib because of the neat output, all columns are properly labeled and an option to output in CSV or HTML

However I'm having trouble making it work, all it does is refresh the page and no files are generated.

 

Is this a problem with MS2 and RCA version compatibility? Or just a problem in the code? Also it's hard coded but even manual changing the link gives more error.

 

Please I really need it, so I need all help so guys can offer.

Thanks a lot!

 

Anyone has a solution yet? As requested above it does have column header information, just the problem is making it work, as this just refreshes when clicked.

Share this post


Link to post
Share on other sites

Hello there,

 

I really love this addon and it helps a lot with the automatic printing of labels etc etc. To make it perfect though I really need to export the order ATTRIBUTES and possibly the prices/taxes for my accounts. If anyone can help me with this I would be very greatful. I'm not a programmer so don't really know where to start.

 

Thanks! Mike

Share this post


Link to post
Share on other sites
Who can help me? This script was working well; and after a change to another server this great contribution isn't working anymore.

 

I have RC1

 

I can use the contrib but after pressing 'Generate' nothing is happening; only the url gives: export_orders_csv.php?start=800&end=850&status=&submitted=1

 

Does anyone have the same problem?

 

 

osCommerce export orders to csv file doesn't seem to work?

 

The contribution installed ok - but when I hit the 'Export to CSV' button nothing seemed to work, just a screen refresh

 

This was bugging me for a while - even on a vanilla v2.2 RC2a install...

 

Try this: create a text file called php.ini and in this file have one line of text:

register_globals=on

 

Upload this file to the root of your osCommerce installation - e.g. catalog/php.ini

 

That should do it

Share this post


Link to post
Share on other sites

This contribution is not working very well. When I edited the customer.php file, my entire admin section disappeared. Then I switched to this contrib:

 

http://www.oscommerce.com/community/contributions,4728

 

And this part of the instructions does not make sense to me:

3. In admin/includes/boxes/reports.php, change this (or whichever line is NOT last in the menu):

 

// add export orders to csv

'<a href="' . tep_href_link(FILENAME_EXPORT_ORDERS_CSV, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_EXPORT_ORDERS_CSV . '</a><br>' .

// end export orders to csv

 

(change what??)

 

Because when I add that to my reports section I get multiple errors, one being

Parse error: syntax error, unexpected '}' in /home/zajanat/public_html/admin/includes/boxes/reports.php on line 28

 

When I remove the code my admin works again.

Share this post


Link to post
Share on other sites

You need to insert it into the middle of the list

 

'</a><br>' .

'<a href="' . tep_href_link

 

Change it to this

 

'</a><br>' .

// add export orders to csv

'<a href="' . tep_href_link(FILENAME_EXPORT_ORDERS_CSV, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_EXPORT_ORDERS_CSV . '</a><br>' .

// end export orders to csv

'<a href="' . tep_href_link

Share this post


Link to post
Share on other sites
You need to insert it into the middle of the list

 

 

 

Change it to this

 

Thank you so much! I was inserting it under the second line instead of the first. Thank you for the help!

Share this post


Link to post
Share on other sites
It is possible to have column headings and to have say customer details on one line and the items on individual lines below that. I've modified this to suit my needs, so it should be possible to do whatever you want. I can give you my code if that will help?

 

 

Hello Katie,

I've read through this forum and didn't find any solution about this issue. It'll be great if you can share your code of how to export the column headinig (field name) on the .csv file. :D

 

Also when a order has more than one items, anyone knows how to make the "BEGIN_ITEM" (product names) "END_ITEM" to the next row?

 

Thanks!!

Share this post


Link to post
Share on other sites

Hi,

 

Have you found a solutions on how ot add the attributes to the order?

 

Thanks

Jesper

 

 

 

 

Hello there,

 

I really love this addon and it helps a lot with the automatic printing of labels etc etc. To make it perfect though I really need to export the order ATTRIBUTES and possibly the prices/taxes for my accounts. If anyone can help me with this I would be very greatful. I'm not a programmer so don't really know where to start.

 

Thanks! Mike

Share this post


Link to post
Share on other sites

Just started using this contribution on a v2.2 RC1 store. Contrib works good. I made a simple sort order change to the drop-down lists and CSV output file to display orders in descending order.

 

To sort order descending in the range lists, on or about line 66 change:

 

$orders_list_query = tep_db_query("SELECT orders_id, date_purchased FROM orders ORDER BY orders_id");

 

to:

 

$orders_list_query = tep_db_query("SELECT orders_id, date_purchased FROM orders ORDER BY orders_id DESC");

 

With this change the following change is needed otherwise the CSV file won't display the orders at all. On or about line 118 change:

 

generatecsv($_GET['start'], $_GET['end']);

 

to

 

generatecsv($_GET['end'], $_GET['start']);

 

The orders now output in ascending sort order in CSV. The next change sorts the orders in descending order in the CSV output file. On or about line 140 change:

 

$orders = tep_db_query("SELECT orders_id, date_purchased, customers_name, cc_owner, customers_company, customers_email_address, billing_street_address, billing_city, billing_state, billing_postcode, billing_country, customers_telephone, delivery_name, delivery_company, delivery_street_address, delivery_city, delivery_state, delivery_postcode, delivery_country, cc_type, cc_number, cc_expires

FROM orders WHERE orders_id >= $start AND orders_id <= $end ORDER BY orders_id");

 

to:

 

$orders = tep_db_query("SELECT orders_id, date_purchased, customers_name, cc_owner, customers_company, customers_email_address, billing_street_address, billing_city, billing_state, billing_postcode, billing_country, customers_telephone, delivery_name, delivery_company, delivery_street_address, delivery_city, delivery_state, delivery_postcode, delivery_country, cc_type, cc_number, cc_expires

FROM orders WHERE orders_id >= $start AND orders_id <= $end ORDER BY orders_id DESC");

 

Appreciate any feedback or insights on potential issues with these changes.

 

QUESTIONS:

1. My client further wants the CSV file to display orders in COLS instead of ROWS. He's manually converting rows to cols in Excel, but is a way to change the CSV export to handle this?

 

2. Must second the request others here have made to export with field headings. Is this an easy change?

Share this post


Link to post
Share on other sites

2 quick questions to pose on this thread:

 

1) Is it possible to get product attributes feeding into the csv output? My supplier wants to get an order summary in a csv like this, but have all attributes listed too.

 

2) Again, is it possible to print column headings into the exported file?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now