@php $item_label = DB::table('labels') ->where('id', @$item->itemContents[0]->label_id) ->first(); $label = $item_label->name ?? null; $color = $item_label->color ?? null; $flash_info = flashAmountStatus($item->id, $item->current_price); $product_current_price = $flash_info['amount']; $flash_status = $flash_info['status']; @endphp @if (!is_null(@$item->itemContents[0]->slug))
@php $discountPct = 0; if (!empty($item->previous_price) && $item->previous_price > $item->current_price) { $discountPct = round((($item->previous_price - $item->current_price) / $item->previous_price) * 100); } @endphp @if ($label) {{ $label }} @elseif ($discountPct > 0) {{ $discountPct > 15 ? 'Sale!' : $discountPct . '%' }} @elseif ($item->flash == 1) {{ $item->flash_amount }}% @else Sale! @endif
@php $imgSrc1 = user_item_image_url($item->thumbnail ?? '', 'thumbnail'); $secondImg = $item->sliders->first()->image ?? null; $imgSrc2 = $secondImg ? user_item_image_url($secondImg, 'slider') : null; if ($imgSrc2 === $imgSrc1) { $imgSrc2 = null; } @endphp {{ $item->itemContents[0]->title }} @if (!empty($imgSrc2)) {{ $item->itemContents[0]->title }} @endif
@php $customer_id = Auth::guard('customer')->check() ? Auth::guard('customer')->user()->id : null; $checkWishList = $customer_id ? checkWishList($item->id, $customer_id) : false; @endphp
{{ @$item->itemContents[0]->category->name }}

{{ $item->itemContents[0]->title }}

@if(!empty($item->variations) && count($item->variations) > 0)
@foreach($item->variations->take(4) as $var) {{ $var->name ?? $var->variant_name }} @endforeach
@endif
({{ reviewCount($item->id) }})
{{ __('In Stock') }}
@if ($flash_status == true) {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($product_current_price)) }} {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($item->current_price)) }} @else {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($item->current_price)) }} @if(!empty($item->previous_price)) {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($item->previous_price)) }} @endif @endif
@if ($shop_settings->catalog_mode != 1) @endif
@endif