Exporter Tool
Exporter Tool
For our other site (using different software) we had an exporter routine written that would export the sales for the day and create a text file that we could then import into our accounting software. I am unsure of how to alter the file to work with the AC software, but if someone can lend a hand on this then I would be happy to offer the file for anyone else to use.
Re: Exporter Tool
You can create a CSV file for DataPort utility from the text file exported by the other software and then import to AbleCommerce store using DataPort utility.
See the http://wiki.ablecommerce.com/index.php/ ... rt_Utility for more information about DataProt Utility.
See the http://wiki.ablecommerce.com/index.php/ ... rt_Utility for more information about DataProt Utility.
Re: Exporter Tool
I am not trying to import anything into the AC site. What our exporter tool does is export the sales that we completed 'today', and create a text file that is in the correct format for importing into our accounting software. This avoids any manual entry of sales into our accounting software, yet maintains correct inventory counts, etc.
My problem is in pulling the information from the SQL database to populate the fields in the text file.
My problem is in pulling the information from the SQL database to populate the fields in the text file.
Re: Exporter Tool
If you provide some sample text file generated by your exporter tool then it would be really helpful
Re: Exporter Tool
I have replaced the customer name and addresses below (for obvious reasons), and show only a couple of the orders (two will tell you just as much as 20). I can also post the exporter file if you would like, although it was written for a different shopping cart. I also attached the text file if it is easier for you.
Co./Last Name First Name Addr 1 - Line 1 - Line 2 - Line 3 - Line 4 Invoice # Date Customer PO Ship Via Already Printed Item Number Quantity Description Price Discount Total Job Comment Journal Memo Salesperson Last Name Salesperson First Name Shipping Date Tax Code Tax Amount Freight Amount Tax on Freight Freight Tax Amount Sale Status Currency Code Exchange Rate Terms - Payment is Due - Discount Days - Balance Due Days - % Discount - % Monthly Charge Referral Source Amount Paid Payment Method Payment Notes Name on Card Card Number Expiration Date Address (AVS) ZIP (AVS) Card Verification (CVV2) Authorization Code Check Number Category
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 40001010 2 Activated Stone Carbon, 0.4-0.85mm $9.49 $0.00 $18.98 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 40003000 2 Ceramic Raschig Rings- 1L $18.99 $0.00 $37.98 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 30002400 1 Glasrens $3.95 $0.00 $3.95 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 30001090 3 Whisky Yeast with AG $3.99 $0.00 $11.97 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 40005110 1 Oeschlemeter / Hydrometer- Pro Quality $23.95 $0.00 $23.95 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 40005210 1 250ml Measure $11.95 $0.00 $11.95 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20000235 6 Lemon Rum Essence $2.19 $0.00 $13.14 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20000405 3 Moscow Vodka Essence $2.19 $0.00 $6.57 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20003102 1 Absinthe Pro TF Essence- White $3.49 $0.00 $3.49 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20001005 1 Amaretto Essence $2.19 $0.00 $2.19 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20001255 1 Strandier Essence $2.19 $0.00 $2.19 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20001571 1 Wormwood Schnapps Essence- White $2.19 $0.00 $2.19 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Co./Last Name First Name Addr 1 - Line 1 - Line 2 - Line 3 - Line 4 Invoice # Date Customer PO Ship Via Already Printed Item Number Quantity Description Price Discount Total Job Comment Journal Memo Salesperson Last Name Salesperson First Name Shipping Date Tax Code Tax Amount Freight Amount Tax on Freight Freight Tax Amount Sale Status Currency Code Exchange Rate Terms - Payment is Due - Discount Days - Balance Due Days - % Discount - % Monthly Charge Referral Source Amount Paid Payment Method Payment Notes Name on Card Card Number Expiration Date Address (AVS) ZIP (AVS) Card Verification (CVV2) Authorization Code Check Number Category
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 40001010 2 Activated Stone Carbon, 0.4-0.85mm $9.49 $0.00 $18.98 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 40003000 2 Ceramic Raschig Rings- 1L $18.99 $0.00 $37.98 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 30002400 1 Glasrens $3.95 $0.00 $3.95 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 30001090 3 Whisky Yeast with AG $3.99 $0.00 $11.97 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 40005110 1 Oeschlemeter / Hydrometer- Pro Quality $23.95 $0.00 $23.95 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Custfirst Custlast XXXX Atomic Road Beech Island, SC 29842 United States 7/18/2008 27734 UPS Ground 40005210 1 250ml Measure $11.95 $0.00 $11.95 Sale; Custlast, Custfirst 7/18/2008 $0.00 $13.38 $0.00 I USD 1 1 0 0 0 0 $122.16 Electronic Check
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20000235 6 Lemon Rum Essence $2.19 $0.00 $13.14 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20000405 3 Moscow Vodka Essence $2.19 $0.00 $6.57 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20003102 1 Absinthe Pro TF Essence- White $3.49 $0.00 $3.49 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20001005 1 Amaretto Essence $2.19 $0.00 $2.19 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20001255 1 Strandier Essence $2.19 $0.00 $2.19 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Miscellaneous Cust2first Cust2last XXXX Silver Quail San ANtonio, TX 78250 United States 7/18/2008 27859 DHL Ground 20001571 1 Wormwood Schnapps Essence- White $2.19 $0.00 $2.19 Sale; Cust2last, Cust2first 7/18/2008 $0.00 $6.97 $0.00 I USD 1 1 0 0 0 0 $36.74 MasterCard 014161
Re: Exporter Tool
Well i have a look at the file and it seems each block contains data for a single order. In order to extract the information from database and to write it into this sort of file you can use the order object.
will return you all the store orders and then you can iterate over these order by getting a single order at a time and writing information from it to the text file.
For example for first two columns of you text file "Co./Last Name","First Name", you can get value for these from order.BillToLastName and order.BillToFirstName. Similarly first find from where to get value for each column, then you can write some code which creates a text file similarly as the above sample but with the value from you AbleCommerce store databse.
Code: Select all
Token.Instance.Store.Orders
For example for first two columns of you text file "Co./Last Name","First Name", you can get value for these from order.BillToLastName and order.BillToFirstName. Similarly first find from where to get value for each column, then you can write some code which creates a text file similarly as the above sample but with the value from you AbleCommerce store databse.
Re: Exporter Tool
My problem is that I would be in WAY over my head attempting to adapt the file to work with AC. I could likely do it, but as before I am likely best to pay someone that knows how to do these things and have it together in an hour or two, instead of my spending days on it. 
