@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif

Manage All Product Prices

Edit prices for all products inline without page refresh

@forelse($products as $product)

{{ $product->name }}

@if($product->brand) Brand: {{ $product->brand->name }} @endif @if($product->style) Style: {{ $product->style }} @endif @if($product->category) Category: {{ $product->category->name }} @endif
@if($editingProductId === $product->id)
@else @endif
@if($editingProductId === $product->id)
@if($product->category && $product->category->sizeGroup && $product->category->sizeGroup->sizes->count() > 0)
@foreach($product->category->sizeGroup->sizes->sortBy('sort_order') as $size)
@endforeach
@else

This product doesn't have a category with sizes assigned.

@endif
@else
@if($product->category && $product->category->sizeGroup && $product->category->sizeGroup->sizes->count() > 0) @php $sizes = $product->category->sizeGroup->sizes->sortBy('sort_order'); $existingPrices = $product->prices->keyBy('size_id'); $hasPrices = $existingPrices->count() > 0; @endphp @if($hasPrices)
@foreach($sizes as $size) @php $priceRecord = $existingPrices->get($size->id); @endphp
{{ $size->name }}: @if($priceRecord) @if($priceRecord->wholesale_price) ₹{{ number_format($priceRecord->price, 2) }} ₹{{ number_format($priceRecord->wholesale_price, 2) }} @else ₹{{ number_format($priceRecord->price, 2) }} @endif @else - @endif
@endforeach
@else

No prices set yet

@endif @else

No sizes available

@endif
@endif
@empty

No Products Found

Products with categories and size groups will appear here

@endforelse @if($products->hasPages())
{{ $products->links() }}
@endif