State-Wise Shipping Rates
Configure custom shipping prices per state for {{ $book->title }}. If a state field is left blank, the product's Default Shipping Price (₹{{ number_format($book->shipping_price, 2) }}) will be used during order checkout.
@if(count($states) > 0)
@foreach($states as $state)
@php
$existingRate = $book->stateShippingPrices->firstWhere('state_id', $state->id);
$val = $existingRate ? $existingRate->shipping_price : '';
@endphp
@if($existingRate && $existingRate->shipping_price !== null)
Custom
@else
Default
@endif
@endforeach
@else
No states found in the system database. Default shipping price will apply to all orders.
@endif
Bulk Order Shipping Rates
Configure state-wise shipping prices applied when this book's order qualifies as a bulk purchase. If a state field is left blank, the Default Bulk Shipping Price below will be used during bulk order checkout.
@error('bulk_shipping_price')
{{ $message }}
@enderror
Fallback bulk price if a state-wise bulk price is not configured
@if(count($states) > 0)
@foreach($states as $state)
@php
$existingBulkRate = $book->bulkStateShippingPrices->firstWhere('state_id', $state->id);
$bulkVal = $existingBulkRate ? $existingBulkRate->shipping_price : '';
@endphp
@if($existingBulkRate && $existingBulkRate->shipping_price !== null)
Custom
@else
Default
@endif
@endforeach
@else
No states found in the system database. Default bulk shipping price will apply to all bulk orders.
@endif