eCommerce construction > How-to questions

Importing orders successfully

(1/3) > >>

totaffy:
Hi,

I'm starting a new thread from my "Orders Import With Bestsellers" thread, as there appeared to be an issue with that one.

My background is in IT Project Management, I'm not a developer - Though I'm trying to understand the Abantecart system and would really appreciate your help.

I am new to Abantecart, so really my priorities are understanding how/needing to import orders successfully.

Some of the errors iI got in v1.2.10 to me seem of a similar format to the ones I got in v1.2.11



i.e.

v1.2.10
Missing relation ID order_product_id for update_or_insert action in table order_products
Missing relation ID order_total_id for update_or_insert action in table order_totals.

v1.2.11
Missing relation ID order_id for update_or_insert action in table order_products.
Missing relation ID order_id for update_or_insert action in table order_totals

So I'm guessing I'm missing info from some of the _ID columns, or the columns are not correct for the import,

I've listed the columns I think  are likely to be causing an issue below.
and provided as much detail as possible - though please let me know if there is anything else


Please could you help me to import orders successfully?




i've just upgraded to v1.2.11

I'm migrating  content from  'custom developed' website to Abantecart.

I don't know if there are any issues caused by the upgrade, I guess you'll know more about that than me.


As attached i have:

- Submitted 2 test orders using default stripe test transactions plus a COD transaction and exported them (I've added this data to the top 3 rows in the .csv file attached, just for reference)

- Created an order from actual customer data using the exported file, the customer ID is as exported from Abantecart, the product ID is as exported from abantecart

- attempted a test import of a single order using this data in the Abantecart exported table

- line 5 of the attachment is the single order


I wasn't sure what to do with these columns so :

(B) orders.order_id -  included the column and left this field blank?
(DZ) order_products[0].order_id - included the column and left this field blank?
(EA)order_products[0].product_id - included the column and left this field blank?

And got these results:

(It created 4 duplicate records/entries for the single order, without the associated products)

There will be 1 records loaded and processed in this import!

Task Failed
Import Process has been completed. 0 row(s) processed.
For more details see

2017-09-29 10:30:46 - Converting file /home/username/public_html/dev/admin/system/data/import_phpZyJBRg.txt to array. Start row number: 0. Rows count: 1
2017-09-29 10:30:46 - Starting import data from array. Mode: commit
2017-09-29 10:30:46 - Insert into table orders done successfully
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_products. Skipping.
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_totals. Skipping.
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_totals. Skipping.
2017-09-29 10:30:46 - Converting file /home/username/public_html/dev/admin/system/data/import_phpZyJBRg.txt to array. Start row number: 1. Rows count: 1
2017-09-29 10:30:46 - Starting import data from array. Mode: commit
2017-09-29 10:30:46 - Incorrect structure of main Array node. Only table nodes are expected
2017-09-29 10:30:46 - Converting file /home/username/public_html/dev/admin/system/data/import_phpZyJBRg.txt to array. Start row number: 0. Rows count: 1
2017-09-29 10:30:46 - Starting import data from array. Mode: commit
2017-09-29 10:30:46 - Insert into table orders done successfully
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_products. Skipping.
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_totals. Skipping.
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_totals. Skipping.
2017-09-29 10:30:46 - Converting file /home/username/public_html/dev/admin/system/data/import_phpZyJBRg.txt to array. Start row number: 1. Rows count: 1
2017-09-29 10:30:46 - Starting import data from array. Mode: commit
2017-09-29 10:30:46 - Incorrect structure of main Array node. Only table nodes are expected
2017-09-29 10:30:46 - Converting file /home/username/public_html/dev/admin/system/data/import_phpZyJBRg.txt to array. Start row number: 0. Rows count: 1
2017-09-29 10:30:46 - Starting import data from array. Mode: commit
2017-09-29 10:30:46 - Insert into table orders done successfully
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_products. Skipping.
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_totals. Skipping.
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_totals. Skipping.
2017-09-29 10:30:46 - Converting file /home/username/public_html/dev/admin/system/data/import_phpZyJBRg.txt to array. Start row number: 1. Rows count: 1
2017-09-29 10:30:46 - Starting import data from array. Mode: commit
2017-09-29 10:30:46 - Incorrect structure of main Array node. Only table nodes are expected
2017-09-29 10:30:46 - Converting file /home/username/public_html/dev/admin/system/data/import_phpZyJBRg.txt to array. Start row number: 0. Rows count: 1
2017-09-29 10:30:46 - Starting import data from array. Mode: commit
2017-09-29 10:30:46 - Insert into table orders done successfully
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_products. Skipping.
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_totals. Skipping.
2017-09-29 10:30:46 - Missing relation ID order_id for update_or_insert action in table order_totals. Skipping.
2017-09-29 10:30:46 - Converting file /home/username/public_html/dev/admin/system/data/import_phpZyJBRg.txt to array. Start row number: 1. Rows count: 1
2017-09-29 10:30:46 - Starting import data from array. Mode: commit
2017-09-29 10:30:46 - Incorrect structure of main Array node. Only table nodes are expected

Basara:
Hello.
Your file have broken structure. What editor you have?
With any delimiter I try it is broken. In addition you have an unreadable chars inside file looks like your editor mess up the file encoding.
 For example some chars looks like �

abantecart:
Three is a problem with EOL characters. How do you save CSV file?

totaffy:
Hello Basara,Abantecart

Thank you for your responses, I'm using/saving in Excel 2013 to edit the .csv files

Had a look at unreadable chars in wizard are -   - and - £ - pounds signs opened/translated in Excel as  for me.  I tried £,  and without. though still getting the same errors on the import.

I don't really have an idea about the structural issue , the file and attachment is opening ok for me in Excel. I'm not doing anything different with the orders compared to products and customers export/import. Products and customers imported ok without any apparent structural issue in v1.2.10.

I started from scratch, read that if adding/changing columns this may add commas in excel, I may have done this while testing (though did same with products and customers in 1.2.10 ok). Simply exported by ID this time (simplified/less columns for my products), edited  and imported, keeping as .csv format. Though same "Incorrect structure of main Array node. Only table nodes are expected" error. if thats the error.

Also of course missing relation ID for missing values in ID columns - so far I've included/though left the columns listed below blank.

- I've attached the latest file, removing £ or Â

I've had a look at the tables in the database via phpmyadmin
Perhaps could import directly into database?

Though would need a little help with the ID columns

Order ID columns - straightforward numerical order (unique)?
orders.order_id
order_products[0].order_id
order_totals[0].order_id

- Can follow existing sequence for these as exported?
order_totals[0].order_total_id
order_totals[1].order_total_id

- can't see logically where this ID for each order/products comes from, or anywhere else it's referenced in the database?
order_products[0].product_id






abantecart:
Your last attached file is a mess. It will not work.
If you use Excel to enter data and export ready data to CSV, it should work fine.

If you edit CSV manually, you will not be able to do it right (unless you know what you are doing. It does not sound that way)

Navigation

[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Social Login Mod