@extends('bio::layouts.master') @section('content') @section('head') @stop @section('footerJS') @stop @php $sizes = $product->variant()->where('type', 'size')->get(); $colors = $product->variant()->where('type', 'color')->get(); $images = $product->variant()->where('type', 'image')->get(); $gallery = $product->banner; if(empty($gallery)) $gallery = [$product->featured_img]; @endphp @if (!$sizes->isEmpty() && !$colors->isEmpty() && !$images->isEmpty()) @endif
@if (is_array($gallery)) @foreach ($gallery as $key => $values)
@endforeach @endif
{!! Str::limit(clean($product->description, 'clean_all'), 200, '...') !!}
{!! \Bio::price($product->price, $bio->id) !!}
@if (!empty($product->comparePrice))
{!! \Bio::price($product->comparePrice, $bio->id) !!}
@endif
@if (!$sizes->isEmpty())
{{ __('Size') }}
@foreach ($sizes as $item) @endforeach
@endif @if (!$colors->isEmpty())
{{ __('Color') }}
@foreach ($colors as $item) @endforeach
@endif @if (!$images->isEmpty())
{{ __('Image') }}
@foreach ($images as $item) @endforeach
@endif @if (!empty($link = ao($product->extra, 'external_product_link'))) {{ __('Buy Now') }} {!! orion('external-link-1', 'w-3 h-3') !!} @else @endif
@if (!$variant->isEmpty()) @endif
- {{ $product->productType ? __('Downloadable Product') : __('Normal Product') }}

{{ $product->name }}

{!! clean($product->description) !!}
@if (ao($product->stock_settings, 'enable')) @if (!empty(ao($product->stock_settings, 'sku')))
{{ __('SKU') }}:{{ ao($product->stock_settings, 'sku') }}
@endif
{{ __('Stock') }}:{{ ao($product->stock) }}
@endif @if ($has_order && $product->productType == 1) @if (is_array($product->files))

{{ __('Unlocked.') }}

{{ __('Download your unlocked files.') }}

@foreach ($product->files as $key => $value)
{{ __('Download') }}
@endforeach @else

{{ __('Downloadables has not been set by this page.') }}

@endif @endif
@if ($has_order)
@csrf
{{ __('Leave a Review') }}
{{ __('Leave a review on this product.') }}

{{ __('Rating') }}

@else

{{ __('Purchase this product to leave a review.') }}

@endif
{{ number_format($review->count()) }} {{ __('Review(s)') }}
@foreach ($review as $item)
{{ user('name', $item->reviewer_id) }}
{{ $item->review }}
{{ \Carbon\Carbon::parse($item->created_at)->diffForHumans() }}
@endforeach
@if ($has_order)
@if (is_array($user_orders)) @foreach ($user_orders as $item)
{!! avatar($item->payee_user_id, true) !!}
{{ user('name', $item->payee_user_id) }} #{{ $item->id }}
{!! \Bio::price($item->price, $bio->id) !!}
{{ \Sandy\Blocks\shop\Helper\Shop::order_status($item->status) }}
{{ \Carbon\Carbon::parse($item->created_at)->toFormattedDateString() }}
@endforeach @endif
@endif
@endsection