@extends('layouts.app') @section('css') @endsection @php $resto = \App\Models\Restaurants::find(\App\Helpers\CommonMethods::getRestuarantID()); $lang = $resto->default_lang; app()->setLocale($lang); if(session('app_lang') !==null){ $lang = session('app_lang'); app()->setLocale($lang); } @endphp @section('content') @php $restuarant1 = $resto; $resto_metas = \App\Helpers\CommonMethods::getRestoMetas($restuarant1); $currency = isset($resto_metas['BUSSINESS_CCY'])?$resto_metas['BUSSINESS_CCY']:"IQD"; $business_type = isset($resto_metas['BUSSINESS_TYPE'])?$resto_metas['BUSSINESS_TYPE']:"Restaurants"; $allow_pre_order = isset($resto_metas['ALLOW_PRE_ORDERS'])?$resto_metas['ALLOW_PRE_ORDERS']:"No"; $business_type = trim($business_type); @endphp

{{__('label.recipe')}}

@if(isset($recipe)) {{__('label.edit')}} {!! $recipe->name !!} @else {{__('label.new_item')}} @endif
@csrf

{{__('label.cover_image')}}

main_images) && !empty($recipe->main_images->file_name)) style="background: url({!! $recipe->main_images->file_name !!})" @endif>
@if(isset($recipe) && isset($recipe->main_images) && !empty($recipe->main_images->file_name)) {{__('label.remove_image')}} @endif

* image size 1920 X 1280 pixels , size 2.4 Mb

@php $c = []; if(isset($recipe)){ $c = $recipe->categories->pluck('category_id')->toArray(); // dump($c); } @endphp
@if(isset($recipe)) show_recipe_main_price==1) checked @endif> @else @endif
@if($business_type=="ClothsStore") @php $sizes = []; $colors = []; $color_data = null; if(isset($recipe)){ $colors = \App\Models\ClothOptions::where('product_id',$recipe->id)->where('type','color')->pluck('name')->whereNull('deleted_at')->toArray(); //dump($colors); $sizes = \App\Models\ClothOptions::where('product_id',$recipe->id)->where('type','size')->pluck('name')->toArray(); $color_data = \App\Models\ClothOptions::where('product_id',$recipe->id)->whereIn('type',['color','color_image'])->whereNull('deleted_at')->get(); } @endphp @endif
@if(isset($recipe) && isset($recipe->galleries))
@foreach($recipe->galleries as $gallery) @endforeach
@endif
{{-- @if($business_type!="ClothsStore")--}} @if(1) @if(isset($recipe->extra_options) && $recipe->extra_options->count() > 0)

{{__('label.extra_options')}}


@foreach($recipe->extra_options as $option) @endforeach
{{__('label.option_name')}} {{__('label.price')}} {{__('label.items')}} {{__('label.is_mandatory')}}?
{!! $option->name !!} @if($option->name_arabic!="") ( {!! $option->name_arabic !!} ) @endif {!! $option->price !!} @if(isset($option->extra_option_items) && $option->extra_option_items->count() > 0) {!! $option->extra_option_items->count() !!} @endif @if(isset($option->extra_option_items) && $option->extra_option_items->count() > 0) is_mandatory==1) checked @endif value="" data-id="{!! $option->id !!}"> @if($option->is_mandatory==1) User can select {!! $option->mandatory_amount !!} items must @endif @endif
@endif @endif @if(isset($recipe))

{{__('label.variations')}}

@if(isset($recipe->variations) && $recipe->variations->count() > 0) @php $v = (json_decode($recipe->variations[0]->variations)); $exclude_columns = ['variant_type']; $thead = []; if(isset($v)){ foreach($v as $k=>$value){ if(!in_array($k,$exclude_columns)) $thead[$k] = ucwords(str_replace('_',' ',$k)); } if(!in_array('image',$thead)) $thead['image'] = 'Image'; } @endphp @if(isset($thead)) @foreach($thead as $k=>$value) @endforeach @endif @foreach($recipe->variations as $variant) @php $variants = (json_decode($variant->variations)); $is_image = "No"; @endphp @if(isset($variants)) @foreach($variants as $k=>$value) @if(!in_array($k,$exclude_columns)) @if($k=="image") @php $is_image = "Yes"; @endphp @else @if($k=="color") @else @endif @endif @endif @endforeach @if($is_image=="No") @endif @endif @endforeach
{!! $value !!}
{!! $value !!}
@endif
@endif @if(isset($recipe)) @if(isset($resto_metas['ENABLED_PRODUCT_FAQS']) && $resto_metas['ENABLED_PRODUCT_FAQS']=="Yes")

{{__('label.product_faqs')}}

{{__('label.add_faq')}}
@if(isset($recipe->product_faqs) && $recipe->product_faqs->count() > 0)
@foreach($recipe->product_faqs as $faq)

{!! nl2br($faq->answer) !!}

|
@endforeach
@endif
@endif @endif
{{-- @if($business_type!="ClothsStore")--}} @if(1)
is_customized=="1") checked @endif name="is_customized" type="checkbox" />
@endif
status=="1") checked @endif name="status" type="checkbox" />
@if($allow_pre_order=="Yes")
allow_pre_order=="Yes") checked @endif name="allow_pre_order" type="checkbox" />
@endif
{{__('label.save')}} @if( isset($recipe)) {{__('label.upload_gallery')}} @if($business_type!="ClothsStore" ) {{__('label.add_extra_options')}} @endif {{__('label.add_variations')}} @endif
@if( isset($recipe)) @endif @endsection @section('js') @endsection