@extends('frontpage.layouts.main') @push('style') @endpush @section('content')

Checkout

@if (!isset(auth()->user()->id))

{{ __('checkout.customer') }}

@else @csrf @endif
@if (isset($cart_data)) @if (Cookie::get('shopping_order')) @php $total="0" @endphp
@php $weight_total = 0 @endphp @foreach ($cart_data as $key => $data) @php $weight_total = $weight_total + $data->berat_produk @endphp @php $fix_customer_discount = 0; $harga_normal_diskon = 0; $qty = $quantity[$data->variant_id]['quantity']; if (isset(auth()->user()->customer_group_id)) { $status_diskon_customer = false; //Update Septi : 8 Juni 2022 $harga = $data->price;//Update Septi : 8 Juni 2022 foreach ($discount_customer as $dc) { $discount_brand = json_decode($dc->discount); foreach ($discount_brand as $brand) { if ($data->brand_id === $brand->id) { $harga_normal = $data->price; $harga_normal_diskon = $data->discount_price; $potongan = ($data->price * $brand->discount) / 100; $fix_customer_discount = $data->price - $potongan; if ($fix_customer_discount < $data->discount_price) { $status_diskon_customer = true; //Update Septi : 8 Juni 2022 $harga = $fix_customer_discount; } else { if ($data->discount_price > 0) { $data->discount_price > 0 ? ($harga = $data->discount_price) : ($harga = $data->price); } else { $status_diskon_customer = true; //Update Septi : 8 Juni 2022 $harga = $fix_customer_discount; } } } } } //Update Septi : 8 Juni 2022 if ($status_diskon_customer == false) { if ($data->discount_price > 0) { $data->discount_price > 0 ? ($harga = $data->discount_price) : ($harga = $data->price); } } //End Update Septi : 8 Juni 2022 } else { $data->discount_price > 0 ? ($harga = $data->discount_price) : ($harga = $data->price); } $harga = isset($harga) ? $harga : ($data->discount_price > 0 ? $data->discount_price : $data->price); $subtotal += $harga * $qty; $old_subtotal += $data->price * $qty; @endphp @endforeach
{{ __('checkout.product') }} {{ __('checkout.price') }} {{ __('checkout.quantity') }} Total {{ __('checkout.noted') }}
@if (isset(auth()->user()->customer_group_id) && $harga_normal_diskon > $fix_customer_discount) {{ number_format($harga_normal_diskon) }} @endif {{ number_format($harga) }} {{ $qty }} {{ number_format($harga * $qty) }}

{{ __('checkout.summary') }}

+ Sub-Total Rp. 0
- Diskon Rp. 0
Total Rp. 0
+ {{ __('checkout.delivery_charges') }} Rp. 0
{{ __('checkout.total_amount') }} Rp. 0
@if (isset(auth()->user()->id))

{{ __('checkout.billing_details') }}

@if (count($addresses) > 0) @foreach ($addresses as $addres)
@if ($addres->active == 1)
@endif
Nama Penerima : {{ $addres->received_name }}

{{ $addres->detail_address }}

Kecamatan {{ $addres->nama_kecamatan }} {{ $addres->type_kota }} {{ $addres->nama_kota }}, {{ $addres->nama_provinsi }}

@if ($addres->active == 1) @endif
@endforeach @else @endif
@endif

Checkout




@endif @endif
@php $setting = Layout::getLayout() @endphp @php $origins = ''; @endphp @php $settings = Layout::getLayout(); $min_purchase = $settings['settings']['min_purchase']; $internal_courier_price = $settings['settings']['internal_courier_price']; @endphp @endsection @push('scripts') @endpush @push('styles') @endpush