Topic: import from Zen

Hello All,

I have a client with a webshop (zen) and at home a server with FA.
I have build an export page in Zen. Which sent an email with the csv file to the owner.

I am building an import page in FA but run into problems:
Which tables needs to be changed to import the orders from the mailed csv file.

With regards,
BBaart

Re: import from Zen

Sales order orders are stored in sales_orders and sales_orders_details tables.
Janusz

Re: import from Zen

Hello Janusz,

Thank you for your answer.
I have made a sql dump before the client had entered an order and afterwards and the compaired the two files next to each other.
There were many differences in many tables also one table had a binaire record (which I couldn't read)

But the orders are all paid for so they should be handled like so in FA (and I would like to import them so that the user doesn't need to do anything with them anymore)

But if that is impossible or very difficult the client will have to handle them in FA.

With regards,
BBaart

Re: import from Zen

Hi, I am new to FA and am currently evaluating for purpose of integrating to my own ecommerce site. I have chosen FA because of php/mysql. Likewise, I am researching import of order, and I would like my ecommerce site to create the order directly into FA without import steps etc.. In other words, the ecommerce site is to be built upon the tables used in FA.

I have tried to adapt the code used for zen import , but the issue here is that because the order is to be created by external code in the ecommerce site then it needs to be logged into FA etc.. which I am finding difficult.

I had considered also enhancing the Web SOAP service that allows for customer creation etc.. to also include sales order generation, but this is all a bit out of my depth.

So , it appears best to simply add the order directly to the sales_orders and sales_orders_details tables.
Looking at the FA code function add_sales_order(&$order) in sales_order_db.inc, then the procedure is:

1. Begin transaction
2. Get next reference number for sales order from REFS table
3. Insert record into sales_orders table
4. Insert record(s) into sales_orders_details table
5. Update next reference number in REFS table
6. Add to audit table (is this optional?)
7. Commit Transaction

Obviously, FA does a couple of more things such as emailing notification of low stock, and updating sales quote if applicable. But I do not think this is necessary for most ecommerce applications.

So after this long winded explanation, maybe someone with more experience can confirm that:

My understanding is correct and it is that simple to insert sales orders directly into the mysql tables, and that sales orders do not update anything in GL, nor affect stock movements or any other tables. These processes seem to only occur when invoicing the sales order. eg. I have added a sales order via normal FA sales order entry and noted nothing was added to stock movements table.

Re: import from Zen

Hi Chris,

   I am not going to sell you my solutions over here but you can take a look at my website http://www.anterp.com/shop/zencart-fron … ntegration.

  These solutions is to Sync the E-Commerce data into FrontAccounting. The data sync will be automatically sync Category, Products, Customers, Contacts, Sales Order and Sales Invoice into FA.

  FrontAccounting will be sync back the Products Price, Quantity and comments into E-Commerce. Hence, you will need to maintain your products quantity and price in FA. Hope you see the point. Thanks You.

Cheers,

tclim

Re: import from Zen

Gee like that is not blatant advertising, are we stupid?

Chris,

How about the osc_import?

The way I use it is when I have new orders I can log into FA and do a few clicks and tell it to import new customers
and import new orders and then I continue with FA as normal.

There is also options to verify item code and prices and price update FA->osc

tom
ex-osC core developer