@extends('backend.layout') @section('titre') Produits @endsection @section('content') @php $modele='produits' @endphp
Modifier Produit
@if ($errors->any())
@endif
id)}}" class="needs-validation add-product-form" method="POST"> @csrf @method('PUT')
type==1) checked @endif class="typep" name="type" value="1"> Simple
type==2) checked @endif class="typep" name="type" value="2"> Avec déclinaison
newcollection==2) checked @endif name="newcollection" value="1">
@foreach($GLOBALS['languages'] as $language)
defaut==1) {{'required'}} @endif value="{{$produit->translate($language->name)->name}}" class="form-control" id="{{$language->name}}_inputname" name="{{$language->name}}_name" type="text" >
@endforeach @foreach($GLOBALS['languages'] as $language)
@endforeach
@php $tab_img_dec=[] @endphp @foreach($produit->stocks as $stocks) @if(count($stocks->imagedeclinaisons)) @foreach($stocks->imagedeclinaisons as $image) @php $tab_img_dec[]=$image->image_id @endphp @endforeach @endif @endforeach
@if(!empty($produit->images)) @foreach($produit->images as $image) @php $class="" @endphp @if($image->defaut==1) @php $class="image_defaut" @endphp @endif @if($image->survol==1) @php $class="image_survol" @endphp @endif
@if(in_array($image->id,$tab_img_dec)) @else @endif
@endforeach @endif
@php $tab_carac=[] @endphp @php $tab_caracv=[] @endphp @if(count($produit->caracteristiqueproduitvaleurs)>0) @foreach($produit->caracteristiqueproduitvaleurs as $valeur) @if(!empty($valeur->caracteristique_option_id)) @php $id= $valeur->caracteristique_option->caracteristique->id @endphp @php $tab_carac[]=$valeur->caracteristique_option_id; @endphp @endif @if(!empty($valeur->valeur)) @php $id= $valeur->caracteristique_option->caracteristique->id @endphp @php $tab_caracv[$id]=$valeur->caracteristique_option_id @endphp @endif @endforeach @endif @foreach($caracteristiques as $caracteristique)
{{$caracteristique->name}}
@endforeach
@foreach($GLOBALS['languages'] as $language)
@endforeach @foreach($GLOBALS['languages'] as $language)
@endforeach @foreach($GLOBALS['languages'] as $language)
@endforeach
@php $c=0 @endphp @foreach($attributs as $attribut)
@foreach($attribut->AttributOptions as $option)
id,$produitsoption)) checked @endif value="{{$option->id}}" id="attribut_option_id_{{$attribut->id}}" name="attribut_option_id_{{$attribut->id}}[]" type="checkbox" > {{$option->valeur}} @if($attribut->type==2)
@endif
@endforeach
@php $c++ @endphp @if($c @endif @endforeach
@endsection