beginPage(); ?>
head() ?>
beginBody(); ?>
$order,
'attributes' => [
[
'attribute' => 'manager.username',
'label' => \Yii::t('app', 'Manager Username'),
],
'id',
'created_at:date',
[
'attribute' => 'user.username',
'label' => \Yii::t('app', 'Client Username'),
],
[
'attribute' => 'email',
'value' => $order->email?:(!empty($order->user)?$order->user->email:null),
],
[
'attribute' => 'phone',
'value' => $order->phone?:(!empty($order->user)?$order->user->phone:null),
],
[
'attribute' => 'phone2',
'value' => $order->phone2?:null,
],
[
'attribute' => 'numbercard',
'value' => $order->numbercard?:null,
],
[
'attribute' => 'comment',
'value' => $order->comment?:null,
],
[
'attribute' => 'delivery',
'value' => $order->deliveryString?:null,
],
[
'attribute' => 'declaration',
'value' => $order->declaration?:null,
],
[
'attribute' => 'stock',
'value' => $order->stock?:null,
],
[
'attribute' => 'payment',
'value' => $order->orderPayment?$order->orderPayment->lang->title:null,
],
[
'attribute' => 'insurance',
'value' => $order->insurance?:null,
],
[
'attribute' => 'amount_imposed',
'value' => $order->amount_imposed?:null,
],
[
'attribute' => 'shipping_by',
'value' => $order->shipping_by?:null,
],
[
'attribute' => 'city',
'value' => $order->city?:null,
],
[
'attribute' => 'adress',
'value' => $order->adress?:null,
],
[
'attribute' => 'body',
'value' => $order->body?:null,
],
],
]);
?>
products)) {
echo GridView::widget([
'tableOptions' => [
'cellspacing' => '10',
'cellpadding' => '3',
],
'dataProvider' => $dataProvider,
'columns' => [
[
'class' => 'yii\grid\SerialColumn',
],
'sku',
[
'attribute' => 'productVariant.product.brand.lang.title',
'label' => \Yii::t('app', 'Brand'),
],
[
'attribute' => 'productVariant.product.fullName',
'label' => \Yii::t('app', 'Fullname'),
],
[
'label' => \Yii::t('app', 'Properties'),
'value' => function($model) {
/**
* @var OrderProduct $model
*/
$value = '';
foreach ($model->productVariant->properties as $property) {
$value .= $property->lang->title.':'.implode(',', ArrayHelper::getColumn($property->customOptions, 'lang.value')).'
';
}
return $value;
},
'format' => 'html',
],
'count',
'price',
'sum_cost',
'booking',
],
'showOnEmpty' => false,
'layout' => "{items}",
]);
}
?>
getAttributeLabel('total').': '.\Yii::$app->formatter->asDecimal($order->total); ?> грн.
getAttributeLabel('delivery_cost').': '.\Yii::$app->formatter->asText($order->delivery_cost); ?>
$order,
'attributes' => [
'id',
'created_at:date',
[
'attribute' => 'user.username',
'label' => \Yii::t('app', 'Client Username'),
],
[
'attribute' => 'phone',
'value' => $order->phone?:(!empty($order->user)?$order->user->phone:null),
],
[
'attribute' => 'city',
'value' => $order->city?:null,
],
[
'attribute' => 'adress',
'value' => $order->adress?:null,
],
[
'attribute' => 'comment',
'value' => $order->comment?:null,
],
[
'attribute' => 'stock',
'value' => $order->stock?:null,
],
[
'attribute' => 'insurance',
'value' => $order->insurance?:null,
],
[
'attribute' => 'amount_imposed',
'value' => $order->amount_imposed?:null,
],
[
'attribute' => 'shipping_by',
'value' => $order->shipping_by?:null,
],
],
]);
?>
endBody(); ?>
endPage(); ?>