{{-- Template Name: Košarica (Elit Gastro) Custom-branded WooCommerce cart page. This template intentionally renders the *classic* [woocommerce_cart] shortcode rather than the block-based cart, because the classic path runs through woocommerce/cart/cart.php and woocommerce/cart/cart-empty.php — which the theme overrides for full brand control. Any cart block or shortcode in the page editor's content is stripped before rendering, so admins can still add intro copy / extra blocks above and below the cart without double-rendering it. --}} @extends('layouts.app') @section('content') @php $cart = function_exists('WC') ? WC()->cart : null; $cartCountLive = $cart ? $cart->get_cart_contents_count() : 0; $cartIsEmpty = $cartCountLive < 1; @endphp
{{ __('Košarica', 'elit-gastro') }} @if (! $cartIsEmpty) · {{ sprintf(_n('%d artikl', '%d artikla', $cartCountLive, 'elit-gastro'), $cartCountLive) }} @endif

@if ($cartIsEmpty) {{ __('Tvoja košarica je prazna.', 'elit-gastro') }} @else {{ __('Pregled narudžbe', 'elit-gastro') }} @endif

@if ($cartIsEmpty)

{{ __('Pregledaj naš katalog profesionalne ugostiteljske opreme — termičke linije, rashladnu opremu, perilice suđa i još mnogo toga.', 'elit-gastro') }}

@else

{{ __('Provjeri količine, primijeni kupon i nastavi na blagajnu. Transparentne cijene, dostava unutar EU.', 'elit-gastro') }}

@endif
@include('partials.trust-strip')
{{-- Always render the classic cart so woocommerce/cart/cart-empty.php override runs --}} {!! do_shortcode('[woocommerce_cart]') !!}
@php // Render any extra page content (intro copy, cross-sells block, etc.) // EXCEPT the cart itself — strip cart block + shortcode out so it // doesn't render twice. $extra = ''; if (have_posts()) { while (have_posts()) { the_post(); $raw = get_the_content(); $raw = preg_replace('#.*?#s', '', $raw); $raw = preg_replace('##', '', $raw); $raw = str_ireplace('[woocommerce_cart]', '', (string) $raw); $extra = trim((string) $raw); } wp_reset_postdata(); } @endphp @if (! empty($extra))
{!! apply_filters('the_content', $extra) !!}
@endif
@endsection