@props([ 'regular_wishlist' => [], 'combo_wishlist' => [], 'favorites_count' => 0, 'links' => null, ]) @php use App\Models\Product; use App\Models\ComboProduct; use App\Services\TranslationService; use App\Services\MediaService; use App\Services\CurrencyService; $language_code = app(TranslationService::class)->getLanguageCode(); @endphp

{{ labels('front_messages.my_wishlist', 'My Wishlist') }}

{{ labels('front_messages.regular_products', 'Regular Products') }}

@if (count($regular_wishlist) >= 1) @foreach ($regular_wishlist as $details) @php $pro_image = app(MediaService::class)->dynamic_image($details['image'], 50); $pro_name = app(TranslationService::class)->getDynamicTranslation( Product::class, 'name', $details['id'], $language_code, ); @endphp {{-- @dd($details) --}} @endforeach
{{ labels('front_messages.image', 'Image') }} {{ labels('front_messages.product_details', 'Product Details') }} {{ labels('front_messages.price', 'Price') }} {{ labels('front_messages.rating', 'Rating') }} {{ labels('front_messages.action', 'Action') }}
{{ $pro_name }} {{ $pro_name }} @php if ($details['type'] !== 'variable_product') { $price = app(CurrencyService::class)->currentCurrencyPrice( $details['variants'][0]['price'], true, ); $special_price = isset($details['variants'][0]['special_price']) && $details['variants'][0]['special_price'] > 0 ? app(CurrencyService::class)->currentCurrencyPrice( $details['variants'][0]['special_price'], true, ) : $price; } else { $max_price = app(CurrencyService::class)->currentCurrencyPrice( $details['min_max_price']['max_price'], true, ); $special_min_price = isset( $details['min_max_price']['special_min_price'], ) && $details['min_max_price']['special_min_price'] > 0 ? app(CurrencyService::class)->currentCurrencyPrice( $details['min_max_price'][ 'special_min_price' ], true, ) : $max_price; } @endphp @if ($details['type'] !== 'variable_product') {{ $special_price }} @else {{ $max_price }} - {{ $special_min_price }} @endif ★{{ $details['rating'] }} @if ($details['type'] == 'variable_product') {{ labels('front_messages.add_to_cart', 'Add to Cart') }} @else {{ labels('front_messages.add_to_cart', 'Add to Cart') }} @endif
@else
{{ labels('front_messages.wishlist_is_empty', 'Your Wishlist Appears to be Empty.') }}
@endif

{{ labels('front_messages.combo_products', 'Combo Products') }}

@if (count($combo_wishlist) >= 1) @foreach ($combo_wishlist as $details) @php $pro_image = app(MediaService::class)->dynamic_image($details['image'], 50); $combo_pro_name = app(TranslationService::class)->getDynamicTranslation( ComboProduct::class, 'title', $details['id'], $language_code, ); @endphp @endforeach
{{ labels('front_messages.image', 'Image') }} {{ labels('front_messages.product_details', 'Product Details') }} {{ labels('front_messages.price', 'Price') }} {{ labels('front_messages.rating', 'Rating') }} {{ labels('front_messages.action', 'Action') }}
{{ $combo_pro_name }} {{ $combo_pro_name }} @php $price = app(CurrencyService::class)->currentCurrencyPrice($details['price'], true); $special_price = isset($details['special_price']) && $details['special_price'] > 0 ? app(CurrencyService::class)->currentCurrencyPrice( $details['special_price'], true, ) : $price; @endphp {{ $special_price }} ★{{ $details['rating'] }} {{ labels('front_messages.add_to_cart', 'Add to Cart') }}
@else
{{ labels('front_messages.wishlist_is_empty', 'Your Wishlist Appears to be Empty.') }}
@endif
{!! $links !!}