Author Topic: Orders Import With Bestsellers  (Read 4368 times)

Offline totaffy

  • Newbie
  • *
  • Posts: 24
  • Karma: +1/-1
    • View Profile
Orders Import With Bestsellers
« on: September 16, 2017, 05:36:46 PM »
Hi
I would like to  Import orders and therefore bestsellers

I've managed to import products and customers, rhou an struggling with orders
as attached, though get this error _



How do I complete this?


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





Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5796
  • Karma: +274/-2
    • View Profile
Re: Orders Import With Bestsellers
« Reply #1 on: September 18, 2017, 02:02:16 AM »
Hi.

Try to export one order, this will give you correct table

Offline totaffy

  • Newbie
  • *
  • Posts: 24
  • Karma: +1/-1
    • View Profile
Re: Orders Import With Bestsellers
« Reply #2 on: September 18, 2017, 08:00:46 AM »
Hi Basara,

Yes I did that,

What do I put in these columns order_product_id
and order_total_id (for total))

Thanks

Offline totaffy

  • Newbie
  • *
  • Posts: 24
  • Karma: +1/-1
    • View Profile
Re: Orders Import With Bestsellers
« Reply #3 on: September 29, 2017, 07:03:51 AM »
Hi,

I'm still having problems with this, please can you help.

i've just upgraded to v1.2.11

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


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



 






Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Orders Import With Bestsellers
« Reply #4 on: September 29, 2017, 11:20:14 AM »
How is your last post related to "Orders Import With Bestsellers" topic? Was original question resolved?
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline totaffy

  • Newbie
  • *
  • Posts: 24
  • Karma: +1/-1
    • View Profile
Re: Orders Import With Bestsellers
« Reply #5 on: September 29, 2017, 02:18:49 PM »
Hi abantecart,

As far as I realised, I'm doing exactly the same thing, just this time with the upgrade. And I gave more detaii.

It's only for tthe orders import, whiich I would like to populate the bestsellers list. (I'm guessing if done properly, it will).

Just this time I gave more detail

Re: "Try to export one order, this will give you correct table" (Basara,)

I've exported 3 orders (this time , ones I've submited, instead of the default demo data) with the correct  table (this time the full table), which is in the .csv attachment

And added the single order i've tried to import ...and then gave the column issues + results


On the original question the first .csv attachment is of the single order I tried to import, except Id looked at the demo data and removed the columns I didn't think I needed


 just tried to give more detail

Hence the error I'm getting is very similar... Missing relation ID order_product_id


Happy of course to start a new thread, just clarifying


Offline totaffy

  • Newbie
  • *
  • Posts: 24
  • Karma: +1/-1
    • View Profile
Re: Orders Import With Bestsellers
« Reply #6 on: September 29, 2017, 03:51:14 PM »
I did upgraded from v1.2.10 to v1.2.11 before doing the 2nd import for an order record

- So the the first set of results is via 1.2.10 and the 2nd set of error results are via the 1.2.11 import wizard (which is returning more errors, though including similar ones i had the first time)

- Perhaps this is complicating the issue?

I just really need to know how to import orders successfully - so I'm providing the results I'm getting

Happy to start a new thread for importing orders in v1.2.11

 

Powered by SMFPacks Social Login Mod