@php $isMobile = preg_match('/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $_SERVER['HTTP_USER_AGENT']); @endphp @extends('shared.front_without_header') @section('content')
1 {{ __('messages.checkout.delivery') }}
2 {{ __('messages.checkout.payment') }}

{{ __('messages.checkout.shipment_details') }}

@php $b_token_valid = \App\Http\Controllers\HomeController::is_token_still_valid(config('starspin.config.session_timeout')); if (!$b_token_valid) { \App\Http\Controllers\HomeController::do_logout(); } $login_link = config('starspin.config.starguide_login_url') . '?redirect=' . action('HomeController@checkout') . '&utm_source=StarSpin&utm_medium=online&utm_campaign=Star_Spin_Registration'; $logout = config('starspin.config.starguide_logout_url') . '?redirect=' . config('starspin.config.root_url') . '&utm_source=StarSpin&utm_medium=online&utm_campaign=Star_Spin_Registration'; $is_login = \App\Http\Controllers\HomeController::is_loggedin(); if (!$is_login) { $token = isset($_GET['token']) ? $_GET['token'] : ''; $user_id = isset($_GET['user_id']) ? $_GET['user_id'] : ''; } if (!$is_login && $user_id && $token) { $arr_val = [ 'USER_ID' => $user_id, 'ACCESS_TOKEN' => config('starspin.config.access_token'), 'TOKEN' => $token, ]; // GET user $url_get_user = config('starspin.config.api_host') . \App\Http\Controllers\HomeController::template2content(config('starspin.config.uri_get_user'), $arr_val); $response = \App\Http\Controllers\HomeController::callAPI('GET', $url_get_user, false); $user_data = $response ? json_decode($response, true) : null; if ($user_data && isset($user_data['api_status']) && $user_data['api_status'] == 'success') { $full_name = isset($user_data['full_name']) ? $user_data['full_name'] : ''; $mobile = isset($user_data['mobile']) ? $user_data['mobile'] : ''; $city = isset($user_data['location']) ? $user_data['location'] : ''; $email = isset($user_data['email']) ? $user_data['email'] : ''; $user = \App\Member::query() ->where('id', '=', $user_id) ->first(); if ($user == null) { $user = new \App\Member(); $user->id = $user_id; $user->starguide_user_id = $user_id; $user->email = $email; $user->full_name = $full_name; $user->mobile = $mobile; $user->city = $city; $user->ip_address = \App\Http\Controllers\HomeController::get_client_ip_address(); $user->added_date = date('Y-m-d H:i:s'); $user->save(); } if ($user) { \App\Http\Controllers\HomeController::set_login($user, $token); $is_login = \App\Http\Controllers\HomeController::is_loggedin(); } } } else { $userInfo = \App\Http\Controllers\HomeController::get_current_user_object(); $user_id = $userInfo ? $userInfo->id : ''; } @endphp @if ($is_login && $user_id != '') @else
{{ __('messages.checkout.already_have_account') }} {{ __('messages.checkout.login') }}
@endif
@csrf
{{ __('messages.checkout.delivery_information_1') }}
{{ __('messages.checkout.fullname_error') }}
{{ __('messages.checkout.identity_card_error') }}
{{ __('messages.checkout.phone_number_error') }}
{{ __('messages.checkout.email_error') }}
{{ __('messages.checkout.delivery_information') }}
{{ __('messages.checkout.address_error') }}
{{ __('messages.checkout.city_error') }}
{{ __('messages.checkout.district_error') }}
{{ __('messages.checkout.ward_error') }}
@include('home.elements.invoice')
@if ($isMobile)
@include('home.elements.payment-referral')
@endif
{{ __('messages.cart.enter_promotion_code') }}
@if (!$isMobile) @include('home.elements.payment-referral') @endif
{{ __('messages.cart.note-delivery') }}
  • 1  {{ __('messages.cart.product') }}
  • {{ __('messages.cart.sub_total') }} VNĐ
  • {{ __('messages.cart.discount') }} 0 VNĐ
{{ __('messages.cart.total_bill') }} VNĐ
{{ __('messages.cart.include_vat') }}
{{ __('messages.cart.total_floating') }}
{{ __('messages.cart.see_detail') }}
VNĐ
{{-- Modal Shipment Note --}} @include('home.elements.shipment-note') {{-- Modal Payment Referral --}} @include('home.elements.payment-referral-modal') {{-- Modal Promotion --}} @include('home.elements.promotion-modal')
@endsection