@php if(is_array($coupon->apply_ids) && count($coupon->apply_ids) > 0) { $apply_ids = $coupon->apply_ids[0]; } else { $apply_ids = null; } if ($coupon->min_order_price > 0) { $order_type = 'min'; } else { $order_type = 'all'; } @endphp
{{ Form::bsBoxOpen('Thông tin chung') }}
{{ Form::bsSelect('Hình thức khuyến mãi', 'type', $list_coupon_types, $coupon->type, ['id' => 'selectCouponType', 'class' => 'select'])}}
- @if($coupon->type === 'money_bill') @else @endif {{getCurrency()}}
- @if($coupon->type === 'percent_bill') value != 0 ? '' : 'disabled'}}> @else @endif %
@if($coupon->type === 'percent_bill') @else @endif {{getCurrency()}}
{{ Form::bsBoxClose()}} {{ Form::bsBoxOpen('Cấp hình áp dụng') }} {{ Form::bsRadio('Áp dụng cho', 'order_type', ['all'=>'Mọi đơn hàng', 'min'=>'Đơn hàng có giá trị từ'], $order_type, [], 'required') }}
{{getCurrency()}}
{{ Form::bsRadio('Khi mua sản phẩm thuộc', 'apply_for', ['all'=>'Tất cả sản phẩm', 'product_group'=>'Nhóm sản phẩm', 'category'=>'Danh mục', 'product'=>'Sản phẩm cụ thể'],$coupon->apply_for, [], 'required') }} {{ Form::bsBoxClose() }} @section('scripts') @parent @endsection
Áp dụng
{{ Form::bsSelectItem('Chọn sản phẩm', 'ProductSelect', 'product', [], 'single') }}
@if(!empty($product)) {{$product['description']['title'] or ''}} @endif
{{ Form::bsSelectCategoryTree('Chọn thể loại','cat_id',['taxonomy'=>'product','lang_code'=>$lang_code], $apply_ids) }}
{{ Form::bsSelect('Chọn nhóm sản phẩm','group_id', $list_product_groups, $apply_ids) }}
{{ Form::bsBoxOpen('Thời gian áp dụng') }}
expired_at === null) ? 'disabled' : ''}}/>
{{ Form::bsBoxClose() }} {{ Form::bsBoxOpen('Cấu hình sử dụng') }}
limit == 0 ? 'disabled' : 'required'}}>
{{ Form::bsCheckbox('','individual_use_only',[1=>'Không dùng chung với khuyến mãi khác'], [$coupon->individual_use_only]) }} {{ Form::bsCheckbox('','exclude_sale_items',[1=>'Không áp dụng cho sản phẩm đang giảm giá'], [$coupon->exclude_sale_items]) }} {{ Form::bsBoxClose() }}