@extends('frontpage.layouts.main') @push('styles') @endpush @section('content')
@if (isset($cart_data)) {{-- @if (Cookie::get('shopping_cart')) --}} @php $total="0" @endphp
@if(count($cart_data) != 0) @endif @foreach ($cart_data as $key => $data) @php if (isset(auth()->user()->customer_group_id)) { $qty = $data['quantity']; }else{ $qty = $quantity[$data->variant_id]['quantity']; } $data->discount_price > 0 ? $harga = $data->discount_price : $harga = $data->price; if (isset(auth()->user()->customer_group_id) && auth()->user()->customer_group_id > 0) { 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) { $harga = $fix_customer_discount; } else { if ($data->discount_price > 0) { $data->discount_price > 0 ? $harga = $data->discount_price : $harga = $data->price; } else { $harga = $fix_customer_discount; } } } } } } else { $data->discount_price > 0 ? $harga = $data->discount_price : $harga = $data->price; } $subtotal += $harga * $qty; @endphp @endforeach
{{ __('cart.Product') }} {{ __('cart.Price') }} {{ __('cart.Quantity') }} {{ __('cart.Total') }}
{{ number_format($harga) }}
Out of Stock
{{ number_format($harga*$qty) }}

Summary

Sub-Total 0
Total Amount 0
{{-- @endif --}} @endif
@endsection @push('scripts') @endpush