diff --git a/common/models/OrdersProducts.php b/common/models/OrdersProducts.php index 5045d61..dbc7b3e 100755 --- a/common/models/OrdersProducts.php +++ b/common/models/OrdersProducts.php @@ -2,6 +2,8 @@ namespace common\models; +use common\modules\product\models\ProductVariant; + class OrdersProducts extends \yii\db\ActiveRecord { public static function tableName() @@ -31,8 +33,8 @@ class OrdersProducts extends \yii\db\ActiveRecord ]; } - public function getMod() + public function getProductVariant() { - return $this->hasOne(Mod::className(), ['id' => 'mod_id']); + return $this->hasOne(ProductVariant::className(), ['product_variant_id' => 'mod_id']); } } \ No newline at end of file diff --git a/frontend/controllers/IamController.php b/frontend/controllers/IamController.php index 3801f9b..8985228 100755 --- a/frontend/controllers/IamController.php +++ b/frontend/controllers/IamController.php @@ -9,7 +9,7 @@ use yii\filters\VerbFilter; use yii\data\ActiveDataProvider; use yii\data\Pagination; use common\models\User; -use common\models\Order; +use common\models\Orders; use common\models\OrdersProducts; use common\models\Share; use common\models\Price; @@ -72,7 +72,7 @@ class IamController extends Controller public function actionMyorders(){ - $model = Order::find()->where(['user_id'=>Yii::$app->user->id])->orderBy('id DESC')->all(); + $model = Orders::find()->where(['user_id'=>Yii::$app->user->id])->orderBy('id DESC')->all(); return $this->render('myorders',['model'=>$model]); @@ -80,7 +80,7 @@ class IamController extends Controller public function actionShow_order() { - $model = Order::findOne($_GET['id']); + $model = Orders::findOne($_GET['id']); diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php index 2731cb3..3692d9b 100755 --- a/frontend/views/catalog/product.php +++ b/frontend/views/catalog/product.php @@ -123,7 +123,7 @@ $this->registerJs (" В Корзину
- + - + */?>
diff --git a/frontend/views/iam/1person.php b/frontend/views/iam/1person.php index 56481c3..fab2a90 100755 --- a/frontend/views/iam/1person.php +++ b/frontend/views/iam/1person.php @@ -26,7 +26,7 @@ $this->title = 'Профиль';
diff --git a/frontend/views/iam/edit_person.php b/frontend/views/iam/edit_person.php index 34fecf9..5ef051e 100755 --- a/frontend/views/iam/edit_person.php +++ b/frontend/views/iam/edit_person.php @@ -34,7 +34,7 @@ $('#user-phone').mask('(000) 000-0000'); diff --git a/frontend/views/iam/myorders.php b/frontend/views/iam/myorders.php index d46b097..d88c0ef 100755 --- a/frontend/views/iam/myorders.php +++ b/frontend/views/iam/myorders.php @@ -35,7 +35,7 @@ $this->registerJs(" @@ -46,7 +46,7 @@ $this->registerJs("
- +
date_time?>
@@ -55,19 +55,27 @@ $this->registerJs("
- products as $item_p):if(!empty($item_p->cost)):?> + products as $item_p): + ?> + + price)):?>
-
mod->imageAvator)):?>
+
+ productVariant->image->imageUrl, 'product_trumb2')?> + +
product_name?>
Кол-во: count?>
-
cost?> грн.
+
price?> грн.

- + + +
- +
diff --git a/frontend/views/iam/person.php b/frontend/views/iam/person.php index e154d6a..5e8660c 100755 --- a/frontend/views/iam/person.php +++ b/frontend/views/iam/person.php @@ -25,7 +25,7 @@ $this->title = 'Профиль';
diff --git a/frontend/views/iam/share.php b/frontend/views/iam/share.php index f4729e1..98d2773 100755 --- a/frontend/views/iam/share.php +++ b/frontend/views/iam/share.php @@ -34,7 +34,7 @@ $this->registerJs(" -- libgit2 0.21.4