@extends('master.front') @section('title') {{__('Order Success')}} @endsection @section('content')

{{__('Thank you for your order')}}!

{{__('Your order has been placed and will be processed as soon as possible.')}}

{{__('Make sure you make note of your order number, which is')}} {{$order->transaction_number}}

{{__('You will be receiving an email shortly with confirmation of your order.')}}

{{-- Order fields --}} @php // ---- Safe compute values ---- $currency = $order->currency ?? 'BDT'; // Final payable amount $grandNumeric = (float) ($order->pay_amount ?? $order->main_price ?? $order->total ?? 0); // Tax $taxNumeric = (float) ($order->tax ?? 0); // Shipping price (lookup from DB if ID available) $shippingPrice = 0; if (!empty($order->shipping_id)) { $shipRow = DB::table('shipping_services')->where('id', $order->shipping_id)->first(); if ($shipRow) { $shippingPrice = (float) ($shipRow->price ?? 0); } } // Coupon code $couponCode = $order->coupon_code ?? ''; // Decode cart $cart_items = is_string($order->cart) ? json_decode($order->cart, true) : (array) $order->cart; $shipping_info = is_string($order->shipping_info) ? json_decode($order->shipping_info, true) : (array) $order->shipping_info; @endphp {{-- Store values as hidden fields --}} {{-- Billing --}} {{-- Cart items --}} @foreach((array) $cart_items as $productId => $item) @endforeach @endsection