@php $pricingRows = ($pricingRows ?? collect())->values(); if ($pricingRows->isEmpty()) { $pricingRows = collect([(object) [ 'product_variant_id' => null, 'product_unit_id' => null, 'label' => null, 'mrp' => null, 'discount_type' => null, 'discount_value' => null, 'selling_price' => null, 'shipping_cost' => null, 'is_default' => 1, 'status' => 1, 'in_stock_qty' => null, 'is_in_stock' => 1, 'sort_order' => 0, ]]); } $hasDefaultPricing = $pricingRows->contains(fn($pricing) => ($pricing->is_default ?? 0) == 1); @endphp
Pricing Info
Drag the handle to reorder rows — the app shows sizes/quantities in this order.
@foreach ($pricingRows as $index => $pricing) @endforeach
Default Variant Unit Label MRP * Selling Price * Discount (%) Shipping Cost Stock Qty In Stock Status Action
is_default ?? 0) == 1 || (!$hasDefaultPricing && $index === 0))>