@extends('layouts.master') @section('page_title', 'Edit Product') @section('title', 'Products Details') @section('main_item', 'Products') @section('sub_item', 'Edit Product') @section('content')

Edit Product

@csrf @method('PATCH')
{{--
--}}
allow_woocommerce_sync) checked @endif>
product_visible_sync) checked @endif>
@if (!empty($product->attribute_id))
{{-- @php $attribute = App\Attribute::find($product->attribute_id); dd($product ); @endphp --}} @php $number = 0 @endphp @foreach ($child_products as $key => $child_product) @php $key++; $attribute = App\Attribute::find($child_product->attribute_id); $second_attribute = App\Attribute::find($child_product->second_attribute_id); $attribute_value = App\AttributeValue::find($child_product->attribute_value_id); $second_attribute_value = App\AttributeValue::find($child_product->second_attribute_value_id); @endphp @endforeach
Variation Variation Value Quantity Unit Price Selling Price Second Price action
{{ $attribute->attribute_name }} {{ $product->attribute_value }}
{{ $attribute ? $attribute->attribute_name : 'N/A' }} | @if ($second_attribute) {{ $second_attribute->attribute_name }} @endif {{ $attribute_value ? $attribute_value->value : 'N/A' }} | @if ($second_attribute_value) {{ $second_attribute_value->value }} @endif
@php $second_attribute_value_text = $second_attribute_value ? $second_attribute_value->value : 'N/A'; @endphp
{{-- Apply same value for qty --}} @if ($number == 0) @endif
{{-- Apply same value for purchase cost button --}} @if ($number == 0) @endif
{{-- Apply same value for selling price button --}} @if ($number == 0) @endif @php $number++ @endphp
@else @endif
@if (empty($product->attribute_id))
qty)) value="{{ $stock->qty }}" @else value="0" @endif>
@else @endif
is_combo == 'no') hidden @endif hidden>
@endsection @section('scripts') @endsection