@php $cart = \App\Services\ThemeCartService::get(); $subtotal = collect($cart)->sum(fn($i) => $i['price'] * $i['qty']); $couponDiscount = (float) session('coupon_discount', 0); $orderTotal = $subtotal - $couponDiscount; $advanceSummary = $advanceSummary ?? \App\Services\AdvancePaymentService::emptySummary(); $checkoutShopCategories = \App\Models\Category::query() ->whereNull('parent_id') ->where('status', 1) ->where(fn ($q) => \App\Services\ThemeCatalogService::applyThemeScope($q)) ->with(['children' => fn ($q) => $q->where('status', 1) ->where(fn ($c) => \App\Services\ThemeCatalogService::applyThemeScope($c)) ->orderBy('sort_order') ->select(['id', 'name', 'slug', 'parent_id', 'sort_order'])]) ->orderBy('sort_order') ->get(['id', 'name', 'slug', 'sort_order']) ->map(fn ($cat) => [ 'id' => $cat->id, 'name' => $cat->name, 'children' => $cat->children->map(fn ($child) => [ 'id' => $child->id, 'name' => $child->name, ])->values()->all(), ]) ->values() ->all(); @endphp @push('styles') @endpush
|
{{ Str::limit($item['name'], 40) }}
|
৳{{ number_format($item['price'] * $item['qty']) }}
|
| Shipping Fee: ৳0 | |
| Discount: -৳{{ number_format($couponDiscount) }} | |
| Discount: -৳0 | |
| Total | ৳{{ number_format($orderTotal) }} |