registerJs($js, View::POS_READY); ?>
isNewRecord) { echo $form->field($model, 'user_id') ->textInput(); } ?> field($model, 'name') ->textInput([ 'maxlength' => true ]) ?> field($model, 'phone') ->textInput([ 'maxlength' => true ]) ?> field($model, 'email') ->textInput([ 'maxlength' => true ]) ?> field($model, 'city') ->textInput([ 'maxlength' => true ]) ?> field($model, 'address') ->textInput([ 'maxlength' => true ]) ?> field($model, 'comment') ->textInput([ 'maxlength' => true ]) ?> field($model, 'label_id') ->dropDownList($labels) ?> field($model, 'delivery_id') ->dropDownList($deliveries) ?> field($model, 'payment_id') ->dropDownList($payments) ?> isNewRecord) { ?>
orderProducts as $index => $orderProduct) { $sum += ($orderProduct->count * $orderProduct->price) ?>
field($orderProduct, "[$index]variant_id") ->hiddenInput() ->label(false); echo $orderProduct->variant->product->lang->title . '(' . $orderProduct->variant->sku . ')'; ?>
price; ?>
field($orderProduct, "[$index]count") ->textInput(['class' => 'count']) ->label(false); ?>
'fa fa-', ] ), '#', [ 'class' => 'remove-order-product', 'data' => [ 'variant' => $orderProduct->variant->id, 'id' => $model->id, ], ] ) ?>
'add-to-order', 'options' => [ 'placeholder' => \Yii::t('order', 'Select product'), ], 'pluginOptions' => [ 'allowClear' => true, 'minimumInputLength' => 3, 'language' => [ 'errorLoading' => new JsExpression( "function() {return '" . \Yii::t('order', 'Waiting for results') . "'; }" ), ], 'ajax' => [ 'url' => Url::to([ 'product-list' ]), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }'), ], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('function(city) { return city.text; }'), 'templateSelection' => new JsExpression('function (city) { return city.text; }'), ], 'id' => 'add-to-order', ] ); ?>
'form-control', 'id' => 'count-to-order', ] ); ?>
'fa fa-', ] ), '#', [ 'class' => 'variant-to-order', 'data-id' => $model->id, ] ); ?>
'add-to-order', 'options' => [ 'placeholder' => \Yii::t('order', 'Select product'), ], 'pluginOptions' => [ 'allowClear' => true, 'minimumInputLength' => 3, 'language' => [ 'errorLoading' => new JsExpression( "function() {return '" . \Yii::t('order', 'Waiting for results') . "'; }" ), ], 'ajax' => [ 'url' => Url::to([ 'product-list' ]), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }'), ], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('function(city) { return city.text; }'), 'templateSelection' => new JsExpression('function (city) { return city.text; }'), ], 'id' => 'add-to-order', ] ); ?>
'form-control', 'id' => 'count-to-order', ] ); ?>
', '#', [ 'class' => 'btn btn-success', 'id' => 'create-add', ] ); ?>
Всего:

isNewRecord ? Yii::t('order', 'Create') : Yii::t('order', 'Update'), [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ] ) ?>