@extends("admin.layouts.sellermastersoyuz") @section('title',__('Add Product Attributes')) @section('body') @component('seller.components.breadcumb',['secondactive' => 'active']) @slot('heading') {{ __('Add Product Attributes') }} @endslot @slot('menu1') {{ __('Add Product Attributes') }} @endslot @slot('button')
{{ __("Back")}}
@endslot @endcomponent
{{__(':pro \'s Variant',['pro' => $findpro->name])}}
{{ __('Quick Guide') }}
  • {{ __('Common variant not work until you don\'t Link a variant.') }}
  • {{__('Before Link a variant click on')}} {{ __('Add Variant Option') }} ({{__('You can add up to')}} 2 {{__('variant option')}}).
  • {{__('After Link Variant option You can create unlimited variant from that options')}}.
  • {{__("After Add a default variant you can create unlimited common variants")}}.
{{__('Add Common Product Variant For')}} {{ $findpro->name }}
@foreach($findpro->commonvars as $key=> $commonvariant) @endforeach
# {{ __('Variant Name') }} {{ __('Variant Value') }} {{ __('Action') }}
{{ $key+1 }} @php $nameofattr = App\ProductAttributes::where('id','=',$commonvariant->cm_attr_id)->first()->attr_name; @endphp @php $key = '_'; @endphp @if (strpos($nameofattr, $key) == false) {{ $nameofattr }} @else {{str_replace('_', ' ', $nameofattr)}} @endif @php $nameofval = App\ProductValues::where('id','=',$commonvariant->cm_attr_val)->first(); @endphp @if($nameofattr == "Color" || $nameofattr == "Colour" || $nameofattr == 'color' || $nameofattr == 'colour')
{{ $nameofval->values }} @else @if($nameofval->unit_value != null && strcasecmp($nameofval->unit_value, $nameofval->values) != 0) {{ $nameofval->values }}{{ $nameofval->unit_value }} @else {{ $nameofval->values }} @endif @endif
{{__('Add Product Attributes For')}} {{ $findpro->name }}
@foreach($getopts as $opt) @endforeach
# {{ __('Option Names') }} {{ __('Option Value') }} {{ __('Action') }}
{{ $i }} @php $key = '_'; @endphp @if (strpos($opt->getattrname->attr_name, $key) == false) {{ $opt->getattrname->attr_name }} @else {{str_replace('_', ' ', $opt->getattrname->attr_name)}} @endif
@foreach($opt->attr_value as $value) @php $originalvalue = App\ProductValues::where('id',$value)->get(); @endphp @foreach($originalvalue as $value) @if($value->unit_value !=null && strcasecmp($value->unit_value, $value->values) != 0)
@if($value->proattr->attr_name == "Color" || $value->proattr->attr_name == "Colour")
{{ $value->values }} @else {{$value->values}}{{ $value->unit_value }} @endif @else {{$value->values}} @endif
@endforeach @endforeach
{{__('Link variant for')}} {{ $findpro->name }}
@foreach($findpro->subvariants as $key=> $sub) @endforeach
# {{ __('Name') }} {{ __('Additional detail') }} {{ __('Default') }} {{ __('Action') }}
{{$key+1}} @foreach($sub->main_attr_value as $key=> $originalvalue) @if($originalvalue != 0) @php $getattrname = App\ProductAttributes::where('id',$key)->first(); @endphp @php $getattrval = App\ProductValues::where('id',$originalvalue)->first(); @endphp @php $key = '_'; @endphp @if (strpos($getattrname->attr_name, $key) == false) {{ $getattrname->attr_name }} @else {{str_replace('_', ' ', $getattrname->attr_name)}} @endif : @if(strcasecmp($getattrval->unit_value, $getattrval->values) !=0) @if($getattrname->attr_name == "Color" || $getattrname->attr_name == "Colour") {{ $getattrval->values }} @else {{ $getattrval->values }}{{ $getattrval->unit_value }} @endif @else {{ $getattrval->values }} @endif
@else @php $getattrname = App\ProductAttributes::where('id',$key)->first(); @endphp {{ $getattrname->attr_name }} : Not Available
@endif @endforeach

{{ __('Price') }}: {{ $sub->price }}

{{ __('Stock') }}: {{ $sub->stock }}

{{ __('Weight') }}: {{ $sub->weight }}{{ $sub->unitname->short_code ?? '' }}

{{ __('Min Order Qty') }}:{{ $sub->min_order_qty }}

{{ __('Max Order Qty') }}:{{ $sub->max_order_qty }}

def==1 ? "checked" : "" }}>
@foreach($findpro->commonvars as $key=> $commonvariant) @endforeach @foreach($getopts as $opt) @endforeach @foreach($findpro->subvariants as $key=> $sub) @endforeach @endsection @section('custom-script')