@extends('frontend.layouts.app') @section('seo') Checkout | eg APPAREL @endsection @section('content') @php $cart_total = 0; @endphp @if (session('cart')) @foreach (session('cart') as $cart) @php $cart_total += $cart['quantity'] * $cart['price']; $subtotal = 0; $discounted = 0; $countProductInPromo = 0; @endphp @endforeach @endif

Checkout

@if(session('success'))
{{ session('success') }}
@endif {{-- BILLING DETAILS --}}
@csrf
BILLING DETAILS
@error('first_name') {{ $message }} @enderror
@error('last_name') {{ $message }} @enderror
Ex: test@gmail.com @error('email') {{ $message }} @enderror
+63
@error('phone') {{ $message }} @enderror
Ex: Block No./Unit No., Street, Residence, Barangay, City @error('address') {{ $message }} @enderror
{{--
--}}
@error('assigned_date') {{ $message }} @enderror
@error('assigned_time') {{ $message }} @enderror
{{-- ORDER --}}
PRODUCTS
TOTAL
@if (session('cart')) @php $subtotal = $cart_total; $discounted = 0; $countProductInPromo = 0; if ($promo_code && $promo_code == $product_promo) { foreach (json_decode($product_promo, true) as $promo_id) { if ($promo_id == $id) { if ($promo_type == 'Percentage') { $discounted += $subtotal * ($promo_amount / 100); } elseif ($promo_type == 'Fixed') { $discounted += $promo_amount; } elseif ($promo_type == 'Percentage count') { $countProductInPromo++; if ($promo_count <= $details['quantity'] || $promo_count <= $countProductInPromo) { $discounted += $subtotal * ($promo_amount / 100); } else { $discounted += 0; } } elseif ($promo_type == 'Fixed count') { $countProductInPromo++; if ($promo_count <= $details['quantity'] || $promo_count <= $countProductInPromo) { $discounted += $promo_amount; } else { $discounted += 0; } } else { $discounted += 0; } } } } else { if ($promo_type == 'Percentage') { $discounted += $subtotal * ($promo_amount / 100); } elseif ($promo_type == 'Fixed') { $discounted += $promo_amount; } elseif ($promo_type == 'Percentage count') { $countProductInPromo++; if ($promo_count <= $details['quantity'] || $promo_count <= $countProductInPromo) { $discounted += $subtotal * ($promo_amount / 100); } else { $discounted += 0; } } elseif ($promo_type == 'Fixed count') { $countProductInPromo++; if ($promo_count <= $details['quantity'] || $promo_count <= $countProductInPromo) { $discounted += $promo_amount; } else { $discounted += 0; } } else { $discounted += 0; } } @endphp @foreach (session('cart') as $id => $details) @if ($details['quantity'] != 0) {{-- @php $subtotal = $cart_total; if ($promo_code) { if($promo_code == $product_promo) { foreach (json_decode($product_promo, true) as $id) { if ($id == $id){ if ($promo_type == 'Percentage'){ $discounted += $cart_total * ($promo_amount / 100) ; }else if ($promo_type == 'Fixed'){ $discounted += $details['quantity'] * ($cart_total - ($cart_total - $promo_amount)); }else if ($promo_type == 'Percentage count'){ $countProductInPromo++; if ($promo_count <= $details['quantity'] || $promo_count <= $countProductInPromo){ $discounted += $cart_total * (($promo_amount / 100)); }else{ $discounted += $subtotal * (($promo_amount / 100)); } }else if ($promo_type == 'Fixed count'){ $countProductInPromo++; if ($promo_count <= $details['quantity'] || $promo_count <= $countProductInPromo){ $discounted = $promo_amount; }else{ $discounted += 0; } }else{ $discounted = 0; } } } } else { if ($promo_type == 'Percentage'){ $discounted += $cart_total * ($promo_amount / 100) ; }else if ($promo_type == 'Fixed'){ $discounted += $details['quantity'] * ($cart_total - ($cart_total - $promo_amount)); }else if ($promo_type == 'Percentage count'){ $countProductInPromo++; if ($promo_count <= $details['quantity'] || $promo_count <= $countProductInPromo){ $discounted += $cart_total * (($promo_amount / 100)); }else{ $discounted += $subtotal * (($promo_amount / 100)); } }else if ($promo_type == 'Fixed count'){ $countProductInPromo++; if ($promo_count <= $details['quantity'] || $promo_count <= $countProductInPromo){ $discounted = $promo_amount; }else{ $discounted += 0; } }else{ $discounted = 0; } } } @endphp --}}
@if ($details['shop'] == 'trends') @elseif ($details['shop'] == 'skins') @endif
{{ $details['name'] }}
@if ($details['shop'] == 'trends') Size {{ $details['size'] }}, Color: {{ $details['color'] }}
@elseif ($details['shop'] == 'skins') Skincare
@endif x {{ $details['quantity'] }}
P {{ number_format($details['quantity'] * $details['price'], 2) }}
@endif {{-- --}} @endforeach @endif
SUBTOTAL
P {{ number_format($subtotal, 2) }}
DISCOUNTED
- P {{ number_format($discounted , 2) }}
TOTAL
P {{ number_format($subtotal - $discounted, 2) }}
@if($promo_code) @endif
PAYMENT MEHTHOD

Please send a check to Store Name, Store Street, Store Town, Store State / Country, Store Postcode.

Please send your Proof of Purchase together with your name on our facebook page. https://www.facebook.com/EGTRENDSAPPAREL

Please send to this account number.

Account Number: 004703-0598-19
Name: EGLOW BEAUTY AND WELLNESS MANUFACTURING
Branch: 0470 - BOCAUE MACARTHUR HIGHWAY

Please send your Proof of Purchase together with your name on our facebook page. https://www.facebook.com/EGTRENDSAPPAREL

@endsection @section('js') @endsection