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,
]
);
?>