Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
skeeks
/
cms-module-shop
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Merge Requests
0
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3daac621
authored
Apr 14, 2015
by
semenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Начало разработки
parent
d8f3add1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
0 deletions
+53
-0
controllers/OrderController.php
+44
-0
models/ShopOrder.php
+9
-0
No files found.
controllers/OrderController.php
0 → 100644
View file @
3daac621
<?php
/**
* @author Semenov Alexander <semenov@skeeks.com>
* @link http://skeeks.com/
* @copyright 2010 SkeekS (СкикС)
* @date 03.04.2015
*/
namespace
skeeks\modules\cms\shop\controllers
;
use
skeeks\cms\base\Controller
;
use
skeeks\cms\helpers\RequestResponse
;
use
skeeks\modules\cms\shop\models\ShopBasket
;
use
skeeks\modules\cms\shop\models\ShopFuser
;
use
skeeks\modules\cms\catalog\models\Product
;
use
skeeks\modules\cms\shop\models\ShopOrder
;
use
yii\base\UserException
;
/**
* Class OrderController
* @package skeeks\modules\cms\shop\controllers
*/
class
OrderController
extends
Controller
{
/**
* @return array|\yii\web\Response
*/
public
function
actionView
()
{
if
(
!
$id
=
(
int
)
\Yii
::
$app
->
request
->
get
(
'id'
))
{
throw
new
UserException
(
"Заказ не найден"
);
}
if
(
!
$shopOrder
=
ShopOrder
::
findOne
(
$id
))
{
throw
new
UserException
(
"Заказ не найден"
);
}
return
$this
->
render
(
'view'
,
[
'model'
=>
$shopOrder
]);
}
}
\ No newline at end of file
models/ShopOrder.php
View file @
3daac621
...
...
@@ -6,6 +6,7 @@
* @date 02.04.2015
*/
namespace
skeeks\modules\cms\shop\models
;
use
skeeks\cms\helpers\UrlHelper
;
use
skeeks\cms\models\behaviors\HasStatus
;
use
skeeks\cms\models\behaviors\HasStatusBoolean
;
use
skeeks\cms\models\Core
;
...
...
@@ -216,4 +217,11 @@ class ShopOrder extends Core
return
Currency
::
getInstance
(
\Yii
::
$app
->
money
->
currency
);
}
/**
* @return string
*/
public
function
getPageUrl
()
{
return
UrlHelper
::
construct
(
'shop/order/view'
,
[
'id'
=>
$this
->
id
])
->
toString
();
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment