@forelse ($product->productAttach as $key => $photo)
@if ($key == 0)
@else
@endif
@empty
@endforelse
@php
$qty = 0;
if ($product->variant_product) {
foreach ($product->stocks as $key => $stock) {
$qty += $stock->qty;
}
} else {
$qty = $product->current_stock;
}
@endphp
@elseif($product->advanced_product == 'digital_cards') @if ($product->digitalCards->where('used_card', 0)->count() > 0) {{ translate('Available quantity') }} {{ $product->digitalCards->where('used_card', 0)->count() }} {{ translate('Cards') }} @else {{ translate('Out of stock') }} {{ $product->digitalCards->where('used_card', 0)->count() }} {{ translate('Cards') }} @endif @endif
{{ $product->getTranslation('title') }}
@for ($i = 0; $i < $product->review->avg('rate'); $i++)
@endfor
@for ($i = 0; $i < 5 - $product->review->avg('rate'); $i++)
@endfor
@if (roundNumberMaxHalf(explode('-', homeDiscountedPrice($product->id))[0]) == roundNumberMaxHalf(explode('-', homeDiscountedPrice($product->id))[1])) {{ roundNumberMaxHalf(explode('-', homeDiscountedPrice($product->id))[0]) }} {{ currency_sympol()['symbol'] }} @else {{ roundNumberMaxHalf(explode('-', homeDiscountedPrice($product->id))[0]) }} / {{ roundNumberMaxHalf(explode('-', homeDiscountedPrice($product->id))[1]) }} {{ currency_sympol()['symbol'] }} @endif {{-- $540 50% off --}}
@if ($product->advanced_product == 'normal_product' || $product->advanced_product == 'advanced_product' || $product->advanced_product == 'restorants')
@if ($qty > 0)
{{ translate('Available quantity') }}
{{ $qty }} {{ translate('Pieces') }}
@else
{{ translate('Out of stock') }}
{{ $qty }} {{ translate('Pieces') }}
@endif
@elseif($product->advanced_product == 'digital_cards') @if ($product->digitalCards->where('used_card', 0)->count() > 0) {{ translate('Available quantity') }} {{ $product->digitalCards->where('used_card', 0)->count() }} {{ translate('Cards') }} @else {{ translate('Out of stock') }} {{ $product->digitalCards->where('used_card', 0)->count() }} {{ translate('Cards') }} @endif @endif
{{ $product->getTranslation('short_desc') }}
@if ($product->getTranslation('serialized_specs') != null || $product->country != null)
{{ translate('Specs') }}
@isset($product->country)
@endisset
@forelse (json_decode($product->getTranslation('serialized_specs')) as $key => $item)
@empty
@endforelse
{{ translate('Country') }}:
{{ $product->country ? $product->country->getTranslation('title') : '' }}
{{ $key }} :
{{ $item }}
{{ translate('Reviews') }}
@forelse ($reviews as $key => $review)
@empty
@endforelse
{{ $review->user->name }}
{{ $review->review }}
@endforelse