marka seçiyoruz tüm markalarım modelleri gözüküyor sadece seçitğim markanın modeli ve yılı gözükmesini istiyorum.
ücretli veya ücretsiz şekilde yardıma ihtiyacım var.
<section class="bg-info-2 py-5 mb-4 text-light" style="visibility: visible;">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-9 mb-md-3 mb-lg-0">
<div class="row align-items-center">
<div class="col flex-horizontal-center">
<h4 class="font-size-20 mb-0 ml-3">Motorunuzu Seçin.</h4>
</div>
<div class="col my-4 my-md-0">
<h5 class="font-size-15 ml-4 mb-0">
<select class="form-control" id="filtermarka">
<option selected disabled>-- Marka Seçiniz --</option>
@php
$detailedProduct = \App\Brand::where('top', '0')->get();
@endphp
@foreach ($detailedProduct as $value)
@php $valuee = json_decode($value); @endphp
<option value="{{ $valuee->slug }}">{{ $valuee->name }}</option>
@endforeach
</select>
</h5>
</div>
<div class="col my-4 my-md-0">
<h5 class="font-size-15 ml-4 mb-0">
<select class="form-control" id="filtermodel">
<option selected disabled>-- Model Seçiniz --</option>
@php
$detailedProduct = \App\Product::where('variant_product', '1')->get();
$i = 0;
@endphp
@foreach ($detailedProduct as $detailedProduct)
@if ($detailedProduct->choice_options != null)
@foreach (json_decode($detailedProduct->choice_options) as $key => $choice)
@foreach ($choice->values as $key => $value)
@if ($choice->attribute_id == 7)
@php
$i++;
@endphp
<option value="{{ $value }}">{{ $value }}</option>
@endif
@endforeach
@endforeach
@endif
@endforeach
</select>
</h5>
</div>
<div class="col my-4 my-md-0">
<h5 class="font-size-15 ml-4 mb-0">
<select class="form-control" id="filteryil">
<option selected disabled>-- Yıl Seçiniz --</option>
@php
$detailedProduct = \App\Product::where('variant_product', '1')->get();
@endphp
@foreach ($detailedProduct as $detailedProduct)
@if ($detailedProduct->choice_options != null)
@foreach (json_decode($detailedProduct->choice_options) as $key => $choice)
@foreach ($choice->values as $key => $value)
@if ($choice->attribute_id == 8)
<option value="{{ $value }}">{{ $value }}</option>
@endif
@endforeach
@endforeach
@endif
@endforeach
</select>
</h5>
</div>
</div>
</div>
<div class="col-lg-3">
<button type="submit" class="col-lg-12 btn btn-dark" id="filterbtn" onClick="reply_click(this.id)">Filtrele</button>
<script type="text/javascript">
function reply_click(clicked_id)
{
var a = document.getElementById("filtermarka");
var strUserrr = a.value;
var e = document.getElementById("filtermodel");
var strUserr = e.value;
var b = document.getElementById("filteryil");
var strUser = b.value;
location.href = "https://gogomotorcycle.com/brand/"+strUserrr+"?attribute_7%5B%5D="+strUserr+"&attribute_8%5B%5D="+strUser;
}
</script>
</div>
</div>
</div>
</section>