diff --git a/common/models/News.php b/common/models/News.php index ec2664a..b97dfb2 100644 --- a/common/models/News.php +++ b/common/models/News.php @@ -47,6 +47,11 @@ class News extends \yii\db\ActiveRecord ]; } + public function getDate(){ + return date("Y-m-d", $this->dt); + + } + /** * @inheritdoc */ diff --git a/console/migrations/m151109_085627_update_news_img.php b/console/migrations/m151109_085627_update_news_img.php new file mode 100644 index 0000000..142a079 --- /dev/null +++ b/console/migrations/m151109_085627_update_news_img.php @@ -0,0 +1,36 @@ +execute($view); + + } + + public function down() + { + echo "m151109_085627_update_news_img cannot be reverted.\n"; + + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/frontend/controllers/CartController.php b/frontend/controllers/CartController.php new file mode 100644 index 0000000..3eb37dc --- /dev/null +++ b/frontend/controllers/CartController.php @@ -0,0 +1,30 @@ +render('index'); + } + + public function actionStep() + { + + return $this->render('step'); + } + + +} \ No newline at end of file diff --git a/frontend/controllers/NewsController.php b/frontend/controllers/NewsController.php new file mode 100644 index 0000000..fca3790 --- /dev/null +++ b/frontend/controllers/NewsController.php @@ -0,0 +1,39 @@ + News::find(), + 'pagination' => [ + 'pageSize' => 16, + ], + + ]); + return $this->render('index',[ + 'dataProvider' => $dataProvider + ]); + } + + public function actionView() + { + + return $this->render('view'); + } + + +} diff --git a/frontend/views/cart/index.php b/frontend/views/cart/index.php new file mode 100644 index 0000000..41e5b15 --- /dev/null +++ b/frontend/views/cart/index.php @@ -0,0 +1,70 @@ +registerCssFile('/css/style/busket.css'); + +$this->title = 'Корзина'; +$this->params['breadcrumbs'][] = $this->title; +?> +
Корзина
+грн
+ +№ | +Деталь | +Цена,$![]() |
+ Колл.![]() |
+ Сумма,$![]() |
+ + |
1 | +55565: EXIDE TECHNOLOGIES S.A.: Аккумулятор 55Ah-12v VOLTMASTER (242х175х190),L,EN460 | +4.93 | +
+
+
+
+ ![]() ![]() |
+ 4.93 | +![]() |
+
2 | +Аккумулятор 200Ah-12v Energizer Com. (518х276х242), L,EN1050 Energizer 700038105 | +124.96 | +
+
+
+
+ ![]() ![]() |
+ 124.96 | +![]() |
+
3 | +Антифриз 1л. Land Rover stc50529 | +2.85 | +
+
+
+
+ ![]() ![]() |
+ 2.85 | +![]() |
+
Корзина
+