How To Get Item Id For Order Importation

I am trying to import several old orders in my marketplace, but I am facing an problem related with the importation of Order Items.

Between the required fields to import the items into orders there is a column called Item ID. I tried to localize how this information is generated but couldnt find in any place. I already checked this information in the whole database and I can only find the Item ID for products that where already bought.

How can I get the Item ID from a product that was never bought before?

Item ID is generated by the fn_generate_cart_id function (app/functions/fn.cart.php) using the product_id, selected options and other extra parameters.

Did you try to use random value during import of these orders?

Item ID is generated by the fn_generate_cart_id function (app/functions/fn.cart.php) using the product_id, selected options and other extra parameters.

Did you try to use random value during import of these orders?

No, I didnt, but now I will give a try. As this ID was required during the importation and seems to be very specific I thought that maybe it was stored in some place in the database.

Try to use random value. As far as I remember, it should be processed correctly. You can only have issues during order updates from admin panel (the Edit order functionality).