@extends("client.layouts.app") @section("title", __("client.cart.title")) @section("content")

{{ __('client.cart.shopping_cart') }}

{{ __('client.cart.add_more_products') }}
@if(session("success"))
{{ session("success") }}
@endif @if(session("error"))
{{ session("error") }}
@endif @if(empty($totals["items"]))
🛒

{{ __('client.cart.empty') }}

{{ __('client.cart.browse_products') }}
@else
{{ __('client.cart.cart_items') }}
@foreach($totals["items"] as $key => $item) @endforeach
{{ __('common.table.product') }} {{ __('common.table.billing_cycle') }} {{ __('common.table.price') }}
@if(($item["type"] ?? "") === "domain") {{-- A domain line said "Product", with a dash for its term. --}}
{{ __(($item["action"] ?? "register") === "transfer" ? 'client.cart.line_domain_transfer' : 'client.cart.line_domain_register') }}
@else
{{ $item["product_name"] ?? $item["name"] ?? __('client.cart.product') }}
@endif @if(!empty($item["domain"]))
{{ $item["domain"] }}
@endif {{-- What was configured: the options chosen on the order form, which the price already includes, and the addons, which are billed as lines of their own and were added to the total without being shown. --}} @if(!empty($item["config_options"]))
{{ collect($item["config_options"])->pluck('label')->filter()->implode(', ') }}
@endif @foreach($item["addons"] ?? [] as $addon)
+ {{ $addon['name'] ?? __('client.cart.addons') }} {{ display_money_fmt($addon['price'] ?? 0) }}
@endforeach @if(($item["type"] ?? "") === "domain" && ($item["privacy_price"] ?? null) !== null) {{-- WHOIS privacy, at the extension's price. --}}
@csrf {{ __('client.cart.privacy_label') }}: {{ (float) $item['privacy_price'] > 0 ? __('client.cart.privacy_per_year', ['price' => display_money_fmt($item['privacy_price'])]) : __('client.cart.privacy_free') }}
@endif
{{ ($item["type"] ?? "") === "domain" ? trans_choice('client.cart.line_years', (int) ($item["years"] ?? 1), ['count' => (int) ($item["years"] ?? 1)]) : ($item["billing_cycle"] ?? "-") }} {{ display_money_fmt($item["price"] ?? 0) }} @if(!empty($item["comes_with"])) {{-- Ordered with a hosting package: it is removed with that line. --}} {{ __('client.cart.comes_with', ['product' => $item["comes_with"]]) }} @else
@csrf @method("DELETE")
@endif
{{ __('client.cart.promo_code') }}
@csrf
@if($totals["promo_code"] ?? false)
{{ __('client.cart.promo_applied', ['code' => $totals["promo_code"]]) }}
@endif
{{ __('client.cart.order_summary') }}
{{ __('client.cart.subtotal') }}{{ display_money_fmt($totals["subtotal"]) }}
@if(($totals["discount"] ?? 0) > 0)
{{ __('client.cart.discount') }}-{{ display_money_fmt($totals["discount"]) }}
@endif @if(($totals["tax"] ?? 0) > 0)
{{ __('client.cart.tax') }} ({{ $totals["tax_rate"] ?? 0 }}%){{ display_money_fmt($totals["tax"]) }}
@endif
{{ __('client.cart.total') }}{{ display_money_fmt($totals["total"]) }}
@include('client.cart.partials.currency-note') {{ __('client.cart.checkout') }} → {{ __('client.cart.continue_shopping') }}
@endif @endsection