@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
@if (!empty($imgSrc2))
@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 }}
@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