[WIP] Working on orders & invoices
This commit is contained in:
@@ -6,12 +6,15 @@ use App\Models\Shop\OrderDetail;
|
||||
|
||||
class OrderDetails
|
||||
{
|
||||
|
||||
public static function saveBasket($order_id, $data)
|
||||
{
|
||||
foreach ($data as $item) {
|
||||
$item['order_id'] = $order_id;
|
||||
$detail = self::store($item);
|
||||
$detail = self::store([
|
||||
'order_id' => $order_id,
|
||||
'offer_id' => $item['id'],
|
||||
'quantity' => $item['quantity'],
|
||||
'price_taxed' => $item['price'],
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user