@version(2) @load('css/shop.css')
@php $shp_page_title = $lang->shop_all_items; $shp_filter = Context::get('current_filter') ?: ''; if ($current_category) { foreach ($shop_categories as $shp_tc) { if ((int)$shp_tc->category_srl === $current_category) { $shp_page_title = $shp_tc->title; break; } } } elseif ($shp_filter === 'recommend') { $shp_page_title = $lang->shop_home_recommend; } elseif ($shp_filter === 'new') { $shp_page_title = $lang->shop_home_new; } elseif ($shp_filter === 'popular') { $shp_page_title = $lang->shop_home_popular; } elseif ($shp_filter === 'sale') { $shp_page_title = $lang->shop_home_sale; } @endphp

{{ $shp_page_title }}

@php $shp_bc = []; if ($current_category) { $shp_bc_map = []; foreach ($shop_categories as $shp_bc_c) { $shp_bc_map[(int)$shp_bc_c->category_srl] = $shp_bc_c; } $shp_bc_cur = $current_category; $shp_bc_guard = 0; while ($shp_bc_cur > 0 && isset($shp_bc_map[$shp_bc_cur]) && $shp_bc_guard++ < 10) { array_unshift($shp_bc, $shp_bc_map[$shp_bc_cur]); $shp_bc_cur = (int)$shp_bc_map[$shp_bc_cur]->parent_srl; } } @endphp
@include('_currency') @if (($shop_config->show_shop_nav ?? 'Y') !== 'N') {{ $lang->shop_my_orders }} {{ $lang->shop_cart }} @if ($cart_count > 0){{ $cart_count }}@endif @endif
@php $shp_side_cats = ($shop_config->category_layout ?? 'top') === 'side' && count($shop_categories ?? []); @endphp @php // 카테고리 칩: 1차는 항상, 하위는 고른 1차 밑에서만 보여 준다 $shp_chip_tops = []; $shp_chip_subs = []; $shp_chip_cur_top = 0; $shp_chip_parent = -1; foreach ($shop_categories as $shp_cc) { if ((int)($shp_cc->depth ?? 0) === 0) { $shp_chip_tops[] = $shp_cc; $shp_chip_parent = (int)$shp_cc->category_srl; if ((int)$shp_cc->category_srl === $current_category) { $shp_chip_cur_top = $shp_chip_parent; } } else { if ((int)$shp_cc->category_srl === $current_category) { $shp_chip_cur_top = $shp_chip_parent; } $shp_chip_subs[$shp_chip_parent][] = $shp_cc; } } @endphp @if (!$shp_side_cats && count($shp_chip_tops)) @if ($shp_chip_cur_top > 0 && count($shp_chip_subs[$shp_chip_cur_top] ?? [])) @endif @endif
@if ($shp_filter !== '')@endif @if (($shop_config->show_search ?? 'Y') !== 'N') @endif @foreach (['display' => $lang->shop_sort_display, 'new' => $lang->shop_sort_new, 'popular' => $lang->shop_sort_popular, 'price_low' => $lang->shop_sort_price_low, 'price_high' => $lang->shop_sort_price_high] as $key => $label) {{ $label }} @endforeach
@if ($shp_side_cats) @include('_sidecats') @endif
@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 @if ($it->is_recommend === 'Y'){{ $lang->shop_badge_recommend }}@endif @foreach ($it->badge_list ?? [] as $shp_bg) @php $shp_bg_style = ''; if (!empty($shp_bg->bg_color)) { $shp_bg_style .= 'background:' . $shp_bg->bg_color . ';'; } if (!empty($shp_bg->color)) { $shp_bg_style .= 'color:' . $shp_bg->color . ';'; } @endphp {{ $shp_bg->title }} @endforeach @if ($it->is_new === 'Y')NEW@endif @if ($it->is_adult === 'Y')19@endif {{-- 뷰티 편집숍 카드의 윗줄. 상품 한 줄 소개를 브랜드명 자리처럼 쓴다 --}} @if (!empty($it->summary)) {{ $it->summary }} @endif {{ $it->item_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
@php $shp_nav = Context::get('page_navigation'); @endphp @if ($shp_nav && (int)$shp_nav->last_page > 1) @endif @endif