Module Name
==================
Export Shipping Information


Version Date
============
v 1.2.2 07.13.2007 09:17


Author
======
Eric Leuenberger <econcepts@zencartoptimization.com>
http://www.zencartoptimization.com


Description
===========
This module enables you, from within the Admin, export shipping information in Excel (csv) format for orders placed.

What you do with that file is up to you. Some ideas: Drop shipping fulfillment, Analysis of data in Excel spreadsheets,
bulk printing of labels, bulk printing of envelopes, etc.. you get the idea. 


Compatibility
=============
Compatible with Zen Cart v1.2x + (obviously includes 1.3x versions) 
http://www.zen-cart.com


Files to Overwrite
==================
None (unless you are upgrading in which case you should overwrite all previous files with these new ones).


Affects DB
==========
Yes (creates new field "downloaded_ship" in Orders table)


DISCLAIMER
==========
Installation of this contribution is done at your own risk.
Backup your ZenCart database and any and all applicable files before proceeding.


Features:
=========
- Exports shipping data in CSV format for use in external programs like MS Excel
- After records are exported, they are marked as such in the database so duplicate data is not exported again
- Generates unique filenames for each export based on date and time of export
- Ability to run in Test Mode
- Option to export in 2 different layout formats
	1) 1 Order per row (default)
	2) 1 Product per row


Install / Ugrade:
=================
1. Upload the entire contents of the "admin" folder to your website. All directories are
   already named for you and there are no files to overwrite so it should be easy.
   NOTE: If you changed the name of your "admin" directory to something else, then upload
         to that directory.

2. Login Admin > Tools > Install SQL Patches and run the following file query:
   NOTE: If you are upgrading from a previous version, you do not need to re-run this SQL command as your
         database should already contain this field.

ALTER TABLE orders ADD downloaded_ship ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no';

3. Enjoy!


Upgrading from version 1.2.1:
==============================
If you are upgrading from version 1.2.1 all you have to upload is the following file:

admin/shipping_export.php

No other files have changed since the last release.



Uninstall
=========
1. To uninstall, delete each of the files you uploaded from this package and then

2. Login Admin > Tools > Install SQL Patches and run the following file query:

ALTER TABLE orders DROP downloaded_ship;


How To Use:
===========

1. From within the admin, go to Tools > Export Shipping/Order Information

2. If there are any new orders placed since your last export, you'll see them listed on the screen. Click on the "Export to Excel Spreadsheet" button.

3. You'll be prompted to save the file down to your computer. Save it to your desired location and you're all set

NOTE: If there are no orders found to export, then the "Export" button will not show.

A video tutorial is available for learning how to use this module. It can be accessed by clicking the link in the upper right hand corner
of the screen from within the Module itself (in the Admin of your cart).


History
=======
v1.0.0 Initial Release
-------
v1.2.0 Add the ability for users to export indiviual prouduct and attribute information for an order
-------
v1.2.1
- Added the ability to export in two different file formats
	- 1 Order per row (default)
	- 1 Product per row
	
- Added "Test" feature. This enables you to run a test export without marking the orders as "exported" in the system. 
   It can be handy if you want to export items and test import into other programs beefore you actually want them to
   bee marked as "exported" (which removes them from future abilities to download). Once you are satisfied with your
   test, de-select that option, and export as normal. The orders will all export and be marked as "exported" so they
   will not show up in future downloads.
   
- Corrected several bugs from version 1.2.0
	- Text qualifier (quote) " added to eliminate records breaking to a new line when a comma was present (mainly in addresses).

	- Added header information and set number of columns to each export making it easier to import into other programs.

	- Corrected issues with multiple lines being exported when more than one comment was present for an order. Now only the first comment
      is exported with the list. This is typically the comment that the customer left while placing the order the first time.

	- All product attributes are added to a single column and are separated by a pipe delimiter " | "

	- Corrected issues with order comments that span multiple lines throwing export off
---------
v1.2.2
- Bugfix: Corrected "table not found" error message when exporting all attributes / 1 product per row
- Bugfix: Corrected placement of Zip code and State fields in export.



RESET the orders downloaded to "no"
----------------------------------------
UPDATE zen137_orders SET downloaded_ship="no" WHERE downloaded_ship="yes"
