shoppingmallv2 init...
This commit is contained in:
parent
c8051a97e0
commit
474a5df7fb
@ -227,6 +227,7 @@ define('AUDIOS', [
|
|||||||
|
|
||||||
//Default값 정의
|
//Default값 정의
|
||||||
define('DEFAULTS', [
|
define('DEFAULTS', [
|
||||||
|
'ORDER_CATEGORY' => getenv('default.order_category') ?: 11,
|
||||||
'USER_CATEGORY' => getenv('default.user_category') ?: 12,
|
'USER_CATEGORY' => getenv('default.user_category') ?: 12,
|
||||||
'ROLE' => getenv('default.role') ?: "guest",
|
'ROLE' => getenv('default.role') ?: "guest",
|
||||||
'STATUS' => getenv('default.status') ?: "use",
|
'STATUS' => getenv('default.status') ?: "use",
|
||||||
|
|||||||
@ -15,7 +15,7 @@ class OrderController extends FrontController
|
|||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
$this->_viewPath .= strtolower($this->_model->getClassName());
|
$this->_viewPath .= strtolower($this->_model->getClassName());
|
||||||
//Default 회원정보 Category
|
//Default 회원정보 Category
|
||||||
$this->_category = DEFAULTS['USER_CATEGORY'];
|
$this->_category = DEFAULTS['ORDER_CATEGORY'];
|
||||||
$this->isRole('index');
|
$this->isRole('index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,13 @@ class SitepageController extends FrontController
|
|||||||
{
|
{
|
||||||
return parent::getFieldBatchFilters();
|
return parent::getFieldBatchFilters();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//권한체크
|
||||||
|
protected function isRole($action)
|
||||||
|
{
|
||||||
|
$this->_category = $this->request->getVar('category') ?: throw new \Exception("분류를 지정하지 않으셨습니다.");
|
||||||
|
parent::isRole($action);
|
||||||
|
}
|
||||||
//Index관련
|
//Index관련
|
||||||
protected function index_process()
|
protected function index_process()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -68,6 +68,13 @@ function getFieldView_OrderHelper($field, $entity, array $viewDatas)
|
|||||||
{
|
{
|
||||||
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
|
case 'cost':
|
||||||
|
case 'price':
|
||||||
|
case 'sale':
|
||||||
|
case 'stock':
|
||||||
|
case 'view_cnt':
|
||||||
|
return number_format(!$value ? 0 : $value);
|
||||||
|
break;
|
||||||
case 'content':
|
case 'content':
|
||||||
return html_entity_decode($value);
|
return html_entity_decode($value);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user