@version(2) @load('css/shop.css') @php if (!function_exists('shp_brand_split')) { // 상품명 표기 규약: "브랜드 / 상품명" 으로 적으면 브랜드를 윗줄에 따로 세운다. function shp_brand_split($shp_nm) { $shp_p = explode(' / ', (string)$shp_nm, 2); if (count($shp_p) === 2) { return ['brand' => trim($shp_p[0]), 'name' => trim($shp_p[1])]; } return ['brand' => '', 'name' => trim((string)$shp_nm)]; } } @endphp
@include('_currency') {{-- 제목은 아래 배너가 크게 맡는다. 여기서는 경로만 남긴다 --}}
@if (($shop_config->show_shop_nav ?? 'Y') !== 'N') {{ $lang->shop_cart }} @if ($cart_count > 0){{ $cart_count }}@endif @endif
{!! $promo_banner['title_html'] ?? escape($promo->title) !!} @if (!empty($promo_banner['text'])){!! $promo_banner['text_html'] ?? escape($promo_banner['text']) !!}@endif @if (!empty($promo->start_date) || !empty($promo->end_date)) {{ $promo->start_date ? zdate($promo->start_date, 'Y.m.d') : '' }} ~ {{ $promo->end_date ? zdate($promo->end_date, 'Y.m.d') : '' }} @endif @if (!empty($promo_banner['point_image'])) @endif
{{-- 배너에 같은 문구가 이미 얹혀 있으면 아래로 다시 내보내지 않는다 --}} @if (!empty($promo->description) && trim((string)$promo->description) !== trim((string)($promo_banner['text'] ?? '')))

{{ $promo->description }}

@endif @if ($promo_state === 'upcoming')

{{ $promo->start_date ? sprintf($lang->shop_promo_before_date, zdate($promo->start_date, 'Y.m.d')) : $lang->shop_promo_before }}

@elseif ($promo_state === 'ended')

{{ $lang->shop_promo_ended }}

@endif @if ($promo_state !== 'upcoming') @if (empty($items))

{{ $lang->shop_no_items }}

@else
@foreach ($items as $it) thumb)) style="background-image:url('{{ escape($it->thumb) }}')" @endif> @if (empty($it->thumb))@endif @if ($it->status === 'soldout'){{ $lang->shop_soldout }}@endif @php $shp_nm = shp_brand_split($it->item_name); @endphp @if ($shp_nm['brand'] !== ''){{ $shp_nm['brand'] }}@endif {{ $shp_nm['name'] }} @if (!empty($it->review_count)) {{ $it->rating_avg }} ({{ number_format($it->review_count) }}) @endif @if (!empty($it->grade_price)) {{ shop_item_price($it, 'effective') }} {{ shop_item_price($it, 'grade') }} {{ $lang->shop_grade }} @elseif (shop_item_on_sale($it)) @php $ss_base = isset($it->disp_price) ? (int)$it->disp_price : (int)($it->price ?? 0); $ss_now = isset($it->disp_sale_price) ? (int)$it->disp_sale_price : (int)($it->sale_price ?? 0); $ss_off = $ss_base > 0 ? (int)round(($ss_base - $ss_now) / $ss_base * 100) : 0; @endphp @if ($ss_off > 0){{ $ss_off }}%@endif {{ shop_item_price($it, 'price') }} {{ shop_item_price($it, 'sale') }} @else {{ shop_item_price($it, 'price') }} @endif @endforeach
@endif @endif