@extends('admin::layouts.master') @push('styles') @endpush @section('content') @php $productCountry = \Modules\Product\Entities\ProductCountry::where('product_id', $product->id) ->where('country_id', auth('admin')->user()->country_id) ->first(); @endphp

{{ $product->name }} {{ translate('Back') }}

{{ renderStarRating($product->activeProductRatings->avg('rating')) }} ({{ ($product->activeProductRatings->avg('rating')) }})
{{ $product->activeProductRatings->count() }}
{{ translate('Reviews') }}
{{ \Modules\Customer\Entities\WishList::where('product_country_id', $productCountry->id)->count() }}
{{ translate('Wishlist') }}
{{ \Modules\Orders\Entities\OrderItems::whereHas('order', function ($q) { $q->whereIn('order_status', ['delivered', 'confirmed', 'packed', 'shipped']); })->where('product_country_id', $productCountry->id)->sum('quantity') }}
{{ translate('Sold') }}
{{ \Modules\Customer\Entities\Cart::where('product_country_id', $productCountry->id)->count() }}
{{ translate('In Cart') }}
@if ($productCountry->is_variant == 0)
{{ $productCountry->number_of_stock }}
@else
{{ $productCountry->productVariations->sum('number_of_stock') }}
@endif
{{ translate('Stock') }}
{{ \Modules\Orders\Entities\OrderItems::whereHas('order', function ($q) { $q->where('order_status', 'pending'); })->where('product_country_id', $productCountry->id)->sum('quantity') }}
{{ translate('Pooling Stock') }}
@if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ \Modules\Orders\Entities\OrderItems::whereHas('order', function ($q) { $q->whereIn('order_status', ['delivered', 'confirmed', 'packed', 'shipped']); })->where('product_country_id', $productCountry->id)->sum('subtotal') }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Total Sold') }}
@if ($productCountry->discount > 0)
{{ $productCountry->discount }}% {{ translate('Off') }}
{{ date('d/m/Y H:i:s', strtotime($productCountry->discount_start_date)) }} - {{ date('d/m/Y H:i:s', strtotime($productCountry->discount_end_date)) }}
@endif {{-- @if (check_product_is_in_stock_log($product->id)) @endif --}}
{{ translate('Status') }}: @if ($productCountry->status) {{ translate('Published') }} @else {{ translate('Draft') }} @endif
{{ translate('Category') }}: @foreach ($product->categories as $category) {{ $category->getTranslation('name', 'en', true) }} @endforeach
{{ translate('Tags') }}: @foreach (\Modules\SearchTag\Entities\SearchTag::whereIn('id', $product->tags->pluck('id'))->get() as $tags) {{ $tags->name }} @endforeach
{{ translate('Minimum Purchase Qty ') }}: {{ $productCountry->min_qty }}
{{ translate('Maximum Purchase Qty ') }}: {{ $productCountry->max_qty != 0 ? $productCountry->max_qty : 'Unlimited' }}
@if ($productCountry->activeProductTax->count())
{{ translate('VAT & Tax') }}
@foreach ($productCountry->activeProductTax as $tax)
{{ $tax->percentage }}%
@endforeach
@endif
{{ translate('Product Data') }}
@if ($productCountry->is_variant) @endif @if ($productCountry->is_variant) @endif @if ($productCountry->is_variant) @foreach ($productCountry->productVariations as $key => $variation) @endforeach @else @endif
@foreach ($variation->combinations as $combination) {{ $combination->attributeValue->attribute_value . ' ' }} @endforeach
MRP: {{ $variation->mrp_price }}     Selling MRP: {{ $variation->offer_price }}
{{ $variation->number_of_stock }}
{{ $variation->sku }}
MRP: {{ $productCountry->mrp_price }}     Selling MRP: {{ $productCountry->offer_price }}
{{ $productCountry->number_of_stock }} {{ $productCountry->sku }}
{{ translate('Stock Update Logs') }}
- Increasing
 
- Reducing
@forelse(\Modules\Product\Entities\ProductStockLog::where('product_country_id', $productCountry->id)->get() as $producStockLog) @if ($producStockLog->productVariation) @else @endif @empty @endforelse
{{$producStockLog->stock_updated_at}}
@foreach ($producStockLog->productVariation->combinations as $combination) {{ $combination->attributeValue->attribute_value . ' ' }} @endforeach
Non-Variant
{{$producStockLog->total_stock}}
@if($producStockLog->action == 'add') @else @endif {{$producStockLog->updated_stock}}
Stock Updates Logs Not Available
{{ translate('Product Description') }}
{!! $product->description !!}
{{ translate('Gallery') }}
@endsection @section('modal') @include('admin::modals.delete_modal') @include('admin::modals.duplicate_modal') @include('admin::modals.confirm_modal') @endsection @section('script') @include('product::scripts.index_scripts') @endsection