Commit 35049efa8541d296b5366547241c4fd398d55876

Authored by Alexey Boroda
1 parent 63fd6495

-User's order page in process

Showing 2 changed files with 8 additions and 2 deletions   Show diff stats
@@ -177,4 +177,9 @@ @@ -177,4 +177,9 @@
177 { 177 {
178 return $this->hasMany(OrderProduct::className(), [ 'order_id' => 'id' ]); 178 return $this->hasMany(OrderProduct::className(), [ 'order_id' => 'id' ]);
179 } 179 }
  180 +
  181 + public function getCustomer()
  182 + {
  183 + return $this->hasOne(Customer::className(), [ 'id' => 'user_id' ]);
  184 + }
180 } 185 }
models/OrderProduct.php
@@ -8,12 +8,13 @@ @@ -8,12 +8,13 @@
8 8
9 /** 9 /**
10 * This is the model class for table "order_product". 10 * This is the model class for table "order_product".
  11 +
11 * 12 *
12 - * @property integer $id 13 +*@property integer $id
13 * @property integer $order_id 14 * @property integer $order_id
14 * @property integer $variant_id 15 * @property integer $variant_id
15 * @property string $sku 16 * @property string $sku
16 - * @property string $price 17 + * @property float $price
17 * @property integer $count 18 * @property integer $count
18 * @property Order $order 19 * @property Order $order
19 * @property Variant $variant 20 * @property Variant $variant