{{ Form::bsBoxOpen() }} {{ Form::bsKeyword($product['seo']['meta_keyword'], [], 'required')}} {{ Form::bsText('Tên sản phẩm','title',$product['description']['title'], ['data-seo' => 'title'], 'required') }} {{ Form::bsTextAreaEditor('Mô tả','description',$product['description']['description'], ['data-seo' => 'description','class'=>'ckeditor-basic'])}} @if(!@count($product_tabs)) {{ Form::bsTextAreaEditor('Nội dung','content',$product['description']['content'], ['data-seo' => 'content']) }} @else
@php($tabContent = @($product->tabContent->pluck('description', 'product_tab_id')->toArray()))
{{ Form::bsTextAreaEditor('','content',$product['description']['content'], ['data-seo' => 'content']) }}
@foreach($product_tabs as $index=>$product_tab)
{{ Form::bsTextAreaEditor('',"tab_content[$index][description]",@$tabContent[$product_tab['product_tab_id']])}}
@endforeach
@endif {{ Form::bsBoxClose() }} {{ Form::bsBoxOpen() }} {{ Form::bsFieldSetOpen('Giá sản phẩm') }}
{{ Form::label('Giá bán ('.getCurrency().')')}} {{ Form::text('price',$product['price'],['class'=>'form-control','bs-type'=>'number'])}}
{{ Form::label('Giá khuyến mãi ('.getCurrency().')')}} {{ Form::number('price_sale',$product['discount']['price'],['class'=>'form-control'])}}
{{--
--}}
{{--
{!! Form::text('start_at_sale', $product['discount']['start_at'], ['class' => 'form-control','bs-type'=>'singleDatePicker','placeholder'=>'Ngày bắt đầu','data-origin'=>$product['discount']['start_at']]) !!}
{!! Form::text('expired_at_sale', $product['discount']['expired_at'], ['class' => 'form-control','bs-type'=>'singleDatePicker','placeholder'=>'Ngày kết thúc','data-origin'=>$product['discount']['expired_at']]) !!}
--}}
{{ Form::bsFieldSetClose() }} {{ Form::bsFieldSetOpen('Tồn kho') }}
{{ Form::label('Mã sản phẩm')}} {{ Form::text('code',$product['code'],['class'=>'form-control'])}}
@if (\Addon::check('advanced_product_quantity'))
{{ Form::label('Số lượng')}}
{{ Form::bsCheckbox(' ','allow_out_of_stock_order',[1=>'Cho phép đặt hàng khi hết hàng'],[$product['allow_out_of_stock_order']]) }}
@else
{{ Form::label('Tình trạng kho')}} {{ Form::select('in_stock',[1=>'Còn Hàng',0=>'Hết hàng'],$product['in_stock'],['class'=>'form-control'])}}
@endif
{{ Form::bsFieldSetClose() }} @php $settings = \Setting::get('wb_checkout_rules'); @endphp @if(!empty($settings['minimum_order_product'])) {{ Form::bsFieldSetOpen('Cấu hình giới hạn số lượng mua') }}
{{ Form::label('Số lượng sản phẩm tối thiểu trên mỗi đơn hàng')}} {{ Form::number('limit_minimum_order',@$product['limit_minimum_order'],['class'=>'form-control'], ['min' => 1])}}
{{ Form::bsFieldSetClose() }} @endif {{ Form::bsFieldSetOpen('Vận chuyển') }}
{{ Form::label('Khối lượng (kg)')}} {{ Form::number('weight',$product['shipping']['weight'],['class'=>'form-control'])}}
{{ Form::bsFieldSetClose() }} {{ Form::bsBoxClose() }} @php $settings = \Setting::get('product_quantity_break'); @endphp @if(\Addon::check('product_quantity_break') && !empty(@$settings['add-to-product-management'])) @php if(empty(@$quantityBreak->discounts)) { $quantityBreak['discount_type'] = $settings['discount-type']; } @endphp {{ Form::bsBoxOpen() }} {{ Form::bsFieldSetOpen('Mua nhiều giá tốt') }} @if($quantityBreak['discount_type'] == 1)
@if(!empty(@$quantityBreak->discounts)) @foreach(json_decode($quantityBreak->discounts) as $key => $value)
- {{getCurrency()}}
@endforeach @else
- {{getCurrency()}}
@endif
@endif @if($quantityBreak['discount_type'] == 2)
@if(!empty(@$quantityBreak->discounts)) @foreach(json_decode($quantityBreak->discounts) as $key => $value)
- %
@endforeach @else
- %
@endif
@endif @if($quantityBreak['discount_type'] == 3)
@if(!empty(@$quantityBreak->discounts)) @foreach(json_decode($quantityBreak->discounts) as $key => $value)
- {{getCurrency()}}
@endforeach @else
- {{getCurrency()}}
@endif
@endif {{ Form::bsFieldSetClose() }} {{ Form::bsBoxClose() }} @endif
Thuộc tính sản phẩm @if(\Addon::check('advanced_product_attribute'))
{{ Form::checkbox('type', 'config', $product->type == 'advanced' ? false : true, [ 'class' => 'form-control', 'id' => 'switchToAdvancedAttribute', 'bs-type'=>'switch', 'data-on-text'=>"Cơ bản", 'data-off-text'=>"Nâng cao", 'data-off-color'=>'success', 'data-on-color'=>"primary"]) }}
@endif
@include('product::product.attribute', ['attributes' => $attributes]) @if(\Addon::check('advanced_product_attribute')) @include('product::product.advanced-attribute', ['attributes' => $attributes]) @endif
@if (Addon::check('related_product')) {{ Form::bsBoxOpen('Sản phẩm liên quan') }}
{{Form::bsSelectItem('Chọn sản phẩm', 'product_select', 'product')}}
@if(!empty(@$relatedProducts)) @foreach($relatedProducts as $related) @endforeach @endif
Hình Tiêu đề
{{$related->title}}
{{ Form::bsBoxClose() }} @section('scripts') @parent @endsection @endif {{ Form::bsSeo('title',$product['seo'], 'detail') }}
@php($product['published_at'] = !empty($product['published_at']) ? $product['published_at'] : (new DateTime())->format('Y-m-d H:i:s')) {{ Form::bsSchedule($product['is_published'],$product['published_at'])}} {{ Form::bsBoxOpen('Phân loại') }} {{ Form::bsSelectCategoryTree('Thể loại','cat_id',['taxonomy'=>$taxonomy,'lang_code'=>$lang_code],$product['cat_id']??request()->get('cat_id')) }} {{ Form::bsMultiSelectCategoryTree('Thể loại khác','other_cat_ids[]',['taxonomy'=>$taxonomy,'lang_code'=>$lang_code],$product['other_cat_ids']) }} {{ Form::bsSelect('nhà sản xuất','manufacturer_id',([0=>'Chưa có']+$manufacturer_lists),$product['manufacturer_id']) }} {{ Form::bsMultiSelect('nhóm sản phẩm','group_feature_ids[]',GroupFeature::getAllByTaxonomy($taxonomy,0),$product['group_feature_ids']) }} @if (Addon::check('tag')) {{ Form::bsMultiSelect('Tags','tags_title[]',Product::getAllTag($taxonomy),Product::getTags($product['id']), ['data-create' => 'true']) }} @endif {{ Form::bsBoxClose() }} @php($size = @(WbTheme::getThumbConfig('product'))) {{ Form::bsLfFile("Hình đại diện ($size)",'thumbnail',$product['thumbnail'],['width'=>150,'height'=>120]) }} {{ Form::bsLfMultiFile("Bộ sưu tập hình ảnh",'gallery',$product['gallery']) }} {{ Form::hidden('menu_id',request()->menu_id) }} {{ Form::hidden('taxonomy','product') }} @if(!empty($product->created_by))
Sản phẩm được tạo bởi
@php( $auth = \getAdminById($product->created_by))

Tên: {{$auth['name']}}

Email: {{$auth['email']}}

@endif
@section('scripts') @parent @endsection