Importing an order

Good day, I am building a functionality to import orders into my order system. It is actually an import action with orderLines. The action should create an Order and import all OrderItems (or orderlines if you will). In the documentation https://filamentphp.com/docs/3.x/actions/prebuilt-actions/import#importing-relationships it says that at the moment only BelongsTo relation types are supported. What is the best way to go about this?
2 Replies
keyduc
keyduc4mo ago
same problem, did you solve it?
HerrChris
HerrChris3w ago
I'm also curious. My idea is to just iterate over order lines and import I was thinking
// foreach csv row
if (!$processedOrder[$orderNumber]) {
// process order data
}
$processedOrder[$orderNumber]['items'] = 'item'; // add item data each row
// foreach csv row
if (!$processedOrder[$orderNumber]) {
// process order data
}
$processedOrder[$orderNumber]['items'] = 'item'; // add item data each row