@if(empty($shippingConfig))

Vui lòng kiểm tra lại cấu hình vận chuyển TopShip

@else @php $order_items = []; $items_discount = 0; $total_items = 0; foreach($order->details as $item) { $attributes = []; if($item->product_option && is_array($item->product_option) && count($item->product_option)) { foreach($item->product_option as $option) { $attributes[] = [ 'name' => $option['parent_name'], 'value' => $option['name'] ]; } } $retail_price = $item->original_price >= $item->price ? $item->original_price : $item->price; $payment_price = $item->price; $items_discount += (($retail_price - $payment_price) * $item->quantity); $total_items += $item->quantity; $order_items[] = [ 'product_name' => $item->product_name, 'quantity' => $item->quantity, 'retail_price' => $retail_price, 'payment_price' => $payment_price, 'attributes' => $attributes, ]; } $order_discount = ($subtotal + ($subtotal * ($order->tax/100))) - $order->total; @endphp @section('scripts') @parent @endsection @endif