@extends('layouts.backoffice') @section('content')

Item Specifications / {{ $storeItem->name }}

@csrf
@if($category_variants->isEmpty()) @else @foreach($category_variants as $variant) @endforeach @endif
Variant Type Required Min Max Length
No variants!
{{ $variant->name }} {{ $GLOBALS['CATEGORY_VARIANT_INPUT_TYPES'][$variant->input_type] }} {{ $variant->required==1 ? 'Yes' : 'No' }} {{ escapeNullOrEmpty($variant->min, "-") }} {{ escapeNullOrEmpty($variant->max, "-") }} {{ escapeNullOrEmpty($variant->length, "-") }}
@php // This part should be matching with the submit backend service of the category variant // to have same variant limitations and controls $input_type = $variant->input_type; $input_name = "spec_value_".$variant->id; if($input_type=='MO'){ $input_name .= "[]"; } $required_attr = $variant->required==1 ? 'true' : 'false'; $value_attr = $variant->default_value; $type_attr = ''; $min_attr = escapeNullOrEmpty($variant->min, ""); $max_attr = escapeNullOrEmpty($variant->max, ""); $length_attr = escapeNullOrEmpty($variant->length, ""); if($input_type == "SO" || $input_type == "MO"){ @endphp
@php } else{ if(isset($item_spec_by_variant[$variant->id])){ $value_attr = $item_spec_by_variant[$variant->id]->value; } if($input_type == "FT"){ $type_attr = 'text'; $min_attr = ''; $max_attr = ''; } elseif($input_type == "DI"){ $type_attr = 'date'; $length_attr = ''; } elseif($input_type == "NB" || $input_type == "PR"){ $type_attr = 'number'; $length_attr = ''; } @endphp
@php } @endphp
Loading...
@endsection