⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.63
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
wix.com.ng
/
resources
/
views
/
user
/
item
/
Edit File: variation.blade.php
@extends('user.layout') @php $selLang = \App\Models\User\Language::where([ ['code', request()->input('language')], ['user_id', Auth::guard('web')->user()->id], ])->first(); $userLanguages = \App\Models\User\Language::where('user_id', Auth::guard('web')->user()->id)->get(); $language_variation_data = []; foreach ($userLanguages as $language) { $item_content = App\Models\User\UserItemContent::where([ ['item_id', $item_id], ['language_id', $language->id], ['user_id', Auth::guard('web')->user()->id], ]) ->select('category_id', 'subcategory_id') ->first(); $category_id = $item_content->category_id ?? null; $subcategory_id = $item_content->subcategory_id ?? null; $variation_contents = App\Models\VariantContent::where('category_id', $category_id) ->orWhere('sub_category_id', $subcategory_id) ->get(); $language_variation_data[$language->id] = $variation_contents; } @endphp @includeIf('user.partials.rtl-style') @section('content')
{{ __('Manage Variations') }}
{{ __('Shop Management') }}
{{ __('Items') }}
{{ truncateString($title,35) ?? '-' }}
{{ __('Manage Variations') }}
{{ __('Manage Variations') }}
{{ __('Back') }}
@csrf
@if (count($variations) > 0) @foreach ($variations as $variation)
@php $product_variation_content = App\Models\User\ProductVariationContent::where([ ['product_variation_id', $variation->id], ['language_id', $selLang->id], ])->first(); @endphp
{{ __('Variation Name') }}
**
{{ __('Select Variation') }}
@foreach ($language_variation_data[$selLang->id] as $variation_content)
variation_name == @$variation_content->id ? 'selected' : '' }} value="{{ $variation_content->id }}" data-variant_id="{{ $variation_content->variant_id }}"> {{ $variation_content->name }}
@endforeach
@php $product_variation_options = App\Models\User\ProductVariantOption::where( 'product_variation_id', $variation->id, )->get(); @endphp @foreach ($product_variation_options as $key => $product_variation_option)
@php $selected_option = App\Models\User\ProductVariantOptionContent::where([ ['product_variant_option_id', $product_variation_option->id], ['language_id', $selLang->id], ])->first(); if ($selected_option) { $variant_option_content = App\Models\VariantOptionContent::where( 'id', intval($selected_option->option_name), )->first(); if ($variant_option_content) { $variant_option_contents = App\Models\VariantOptionContent::where([ ['variant_id', $variant_option_content->variant_id], ['language_id', $selLang->id], ])->get(); } else { $variant_option_contents = []; } } else { $variant_option_contents = []; } @endphp
{{ __('Option') }}
**
{{ __('Select Option') }}
@foreach ($variant_option_contents as $option)
option_name == $option->id) value="{{ $option->id }}"> {{ $option->option_name }}
@endforeach
{{ __('Price') }} ({{ $userBs->base_currency_symbol }})
**
{{ __('Stock') }}
**
@if ($loop->last)
+ {{ __('Add Option') }}
@endif
@endforeach
@endforeach @else
@php $unique_id = \Str::random(9); @endphp
{{ __('Variation Name') }}
**
{{ __('Select Variation') }}
@foreach ($language_variation_data[$selLang->id] as $variation_content)
variation_id == @$variation_content->id ? 'selected' : '' }} value="{{ $variation_content->id }}" data-variant_id="{{ $variation_content->variant_id }}"> {{ $variation_content->name }}
@endforeach
{{ __('Option') }}
**
{{ __('Select Option') }}
{{ __('Price') }}
**
{{ __('Stock') }}
**
+ {{ __('Add Option') }}
@endif {{-- add variant button --}}
{{ __('Add Variant') }}
{{ __('Update Variation') }}
@endsection @section('vuescripts') @endsection
Simpan