@if (!empty($product)) @php $placeholderImg = asset('assets/front/images/placeholder.png'); $mainThumbSrc = user_item_image_url($product->item->thumbnail ?? '', 'slider'); $slides = []; if (!empty($product->item) && $product->item->sliders && count($product->item->sliders) > 1) { foreach ($product->item->sliders as $s) { $imgName = $s->image ?? ''; if (empty($imgName) || $imgName === 'noimage.jpg') { continue; } $sSrc = user_item_image_url($imgName, 'slider'); if (!empty($sSrc) && !in_array($sSrc, $slides)) { $slides[] = $sSrc; } } } // Auto-resolve multi-image gallery from master SQL / thumbnail matching if DB only has <= 1 image if (count($slides) <= 1) { $resolvedImgs = \App\Http\Helpers\ItemImageSqlHelper::resolveSliderImagesForItem($product->item ?? null); if (!empty($resolvedImgs) && count($resolvedImgs) > 1) { $slides = []; foreach ($resolvedImgs as $imgName) { $sSrc = user_item_image_url($imgName, 'slider'); if (!empty($sSrc) && !in_array($sSrc, $slides) && $sSrc !== $placeholderImg) { $slides[] = $sSrc; } } } } if (empty($slides)) { if (!empty($mainThumbSrc) && $mainThumbSrc !== $placeholderImg) { $slides[] = $mainThumbSrc; } else { $slides[] = $placeholderImg; } } @endphp
@php $item_label = DB::table('labels')->where('id', $product->label_id)->first(); $label = $item_label->name ?? null; $color = $item_label->color ?? null; @endphp

{{ $product->title }} {{ $label }}

@php $flash_info = flashAmountStatus($item_id, $product->item->current_price); $product_current_price = $flash_info['amount']; $flash_status = $flash_info['status']; @endphp
@if ($flash_status == true)
{{ $userCurrentCurr->symbol_position == 'left' ? $userCurrentCurr->symbol : '' }} {{ currency_converter($product_current_price) }} {{ $userCurrentCurr->symbol_position == 'right' ? $userCurrentCurr->symbol : '' }}
{{ $userCurrentCurr->symbol_position == 'left' ? $userCurrentCurr->symbol : '' }} {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($product->item->current_price)) }} {{ $userCurrentCurr->symbol_position == 'right' ? $userCurrentCurr->symbol : '' }}
{{ $product->item->flash_amount }}% {{ $keywords['OFF'] ?? __('OFF') }} @else
{{ $userCurrentCurr->symbol_position == 'left' ? $userCurrentCurr->symbol : '' }} {{ currency_converter($product->item->current_price) }} {{ $userCurrentCurr->symbol_position == 'right' ? $userCurrentCurr->symbol : '' }}
@if ($product->item->previous_price > 0) {{ $userCurrentCurr->symbol_position == 'left' ? $userCurrentCurr->symbol : '' }} {{ symbolPrice($userCurrentCurr->symbol_position, $userCurrentCurr->symbol, currency_converter($product->item->previous_price)) }} {{ $userCurrentCurr->symbol_position == 'right' ? $userCurrentCurr->symbol : '' }} @endif
@endif

{{ $product->summary }}

{{ $keywords['SKU'] ?? __('SKU') }}: {{ $product->item->sku }}
@if ($flash_status == true)
{{ $keywords['Days'] ?? __('Days') }}
{{ $keywords['Hours'] ?? __('Hours') }}
{{ $keywords['Mins'] ?? __('Mins') }}
{{ $keywords['Sec'] ?? __('Sec') }}
{{ $product->item->flash_amount }}%
@endif
@if (count($product_variations) > 0) @php $seen_qv_variations = []; @endphp
    @foreach ($product_variations as $product_variation) @php $product_variation_content = App\Models\User\ProductVariationContent::where([ ['product_variation_id', $product_variation->id], ['language_id', $uLang], ])->first(); if (!$product_variation_content) { $product_variation_content = App\Models\User\ProductVariationContent::where('product_variation_id', $product_variation->id)->first(); } $vTitle = function_exists('resolveProductVariationTitle') ? resolveProductVariationTitle($product_variation, $product_variation_content, $uLang, $loop->iteration) : ($product_variation_content?->variation_name ?? ('Option ' . $loop->iteration)); if (isset($seen_qv_variations[$vTitle])) { continue; } $seen_qv_variations[$vTitle] = true; $variant_content_options = App\Models\User\ProductVariantOption::where([ ['product_variation_id', $product_variation->id], ])->get(); @endphp @if (count($variant_content_options) > 0)
  • {{ $vTitle }}:

      @foreach ($variant_content_options as $variant_content_option) @php $variant_option_contents = App\Models\User\ProductVariantOptionContent::where([ ['product_variant_option_id', $variant_content_option->id], ['language_id', $uLang], ])->first(); if (!$variant_option_contents) { $variant_option_contents = App\Models\User\ProductVariantOptionContent::where('product_variant_option_id', $variant_content_option->id)->first(); } $opt_name = function_exists('resolveProductVariantOptionLabel') ? resolveProductVariantOptionLabel($variant_option_contents, $variant_content_option, $uLang) : ($variant_option_contents?->option_name ?? ('Option ' . $variant_content_option->id)); $sup_option_content = make_input_name($opt_name); $id_name = make_input_name($opt_name); $main_id = $sup_option_content . '_' . $id_name . '_' . $variant_content_option->id; @endphp
    • @endforeach
  • @endif @endforeach
@endif @if ($shop_settings->catalog_mode != 1)
@php $customer_id = Auth::guard('customer')->check() ? Auth::guard('customer')->user()->id : null; $checkWishList = $customer_id ? checkWishList($product->item_id, $customer_id) : false; @endphp
{{ $keywords['Share Now'] ?? __('Share Now') }} :
@endif
@endif