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
keyduc9mo ago
same problem, did you solve it?
HerrChris
HerrChris7mo 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
Want results from more Discord servers?
Add your server