shoppingmallv2 init...
This commit is contained in:
parent
c3d837d18e
commit
3a1ecb92eb
@ -154,8 +154,8 @@ define('URLS', [
|
|||||||
'LOGOUT' => '/front/user/logout',
|
'LOGOUT' => '/front/user/logout',
|
||||||
'addCart' => '/ecommerce/addCart',
|
'addCart' => '/ecommerce/addCart',
|
||||||
'cancelCart' => '/ecommerce/cancelCart',
|
'cancelCart' => '/ecommerce/cancelCart',
|
||||||
'paymentCard' => '/ecommerce/paymentCard',
|
'paymentCard' => '/ecommerce/payment/card',
|
||||||
'depositPayment' => '/ecommerce/depositPayment',
|
'paymentDeposit' => '/ecommerce/payment/deposit',
|
||||||
]);
|
]);
|
||||||
//SESSION 관련
|
//SESSION 관련
|
||||||
define('SESSION_NAMES', [
|
define('SESSION_NAMES', [
|
||||||
@ -233,9 +233,12 @@ define('CLASS_ICONS', [
|
|||||||
'SITEPAGE' => '<i class="bi bi-body-text"></i>',
|
'SITEPAGE' => '<i class="bi bi-body-text"></i>',
|
||||||
'CATEGORY' => '<i class="bi bi-boxes"></i>',
|
'CATEGORY' => '<i class="bi bi-boxes"></i>',
|
||||||
'PRODUCT' => '<i class="bi bi-box2"></i>',
|
'PRODUCT' => '<i class="bi bi-box2"></i>',
|
||||||
'ORDER' => '<i class="bi bi-cart4"></i>',
|
'ORDER' => '<i class="bi bi-clipboard-check"></i>',
|
||||||
'PAYMENT' => '<i class="bi bi-cash-coin"></i>',
|
'PAYMENT' => '<i class="bi bi-cash-coin"></i>',
|
||||||
'ECOMMERCE' => '<i class="bi bi-shop"></i>',
|
'ECOMMERCE' => '<i class="bi bi-shop"></i>',
|
||||||
|
'CART' => '<i class="bi bi-cart4"></i>',
|
||||||
|
'CARD' => '<i class="bi bi-credit-card"></i>',
|
||||||
|
'DEPOSIT' => '<i class="bi bi-piggy-bank"></i>',
|
||||||
]);
|
]);
|
||||||
define('AUDIOS', [
|
define('AUDIOS', [
|
||||||
'Alram_GetEmail' => '<object width=0 height=0 data="/sound/jarvis_email.mp3" type="audio/mpeg"></object>',
|
'Alram_GetEmail' => '<object width=0 height=0 data="/sound/jarvis_email.mp3" type="audio/mpeg"></object>',
|
||||||
|
|||||||
@ -37,13 +37,15 @@ $routes->addPlaceholder('uuid', '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}
|
|||||||
$routes->get('/', 'Home::index');
|
$routes->get('/', 'Home::index');
|
||||||
$routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) {
|
$routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) {
|
||||||
});
|
});
|
||||||
$routes->group('ecommerce', ['namespace' => 'App\Controllers'], function ($routes) {
|
$routes->group('ecommerce', ['namespace' => 'App\Controllers\Ecommerce'], function ($routes) {
|
||||||
$routes->post('addCart', 'CartController::insert');
|
$routes->post('addCart', 'CartController::insert');
|
||||||
$routes->get('cancelCart', 'CartController::delete');
|
$routes->get('cancelCart', 'CartController::delete');
|
||||||
$routes->get('paymentCard/(:uuid)', 'EcommerceController::cardPayment_form/$1', ['filter' => 'authFilter:user']);
|
$routes->group('payment', ['namespace' => 'App\Controllers\Ecommerce\Payment', 'filter' => 'authFilter:user'], function ($routes) {
|
||||||
$routes->post('paymentCard/(:uuid)', 'EcommerceController::cardPayment/$1', ['filter' => 'authFilter:user']);
|
$routes->get('card', 'CardController::insert_form');
|
||||||
$routes->get('depositPayment/(:uuid)', 'EcommerceController::depositPayment_form/$1', ['filter' => 'authFilter:user']);
|
$routes->post('card', 'CardController::insert');
|
||||||
$routes->post('depositPayment/(:uuid)', 'EcommerceController::depositPayment/$1', ['filter' => 'authFilter:user']);
|
$routes->get('deposit', 'DepositController::insert_form');
|
||||||
|
$routes->post('deposit', 'DepositController::insert');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
// authGuard는 App\Config\Filters.php의 $aliases에 선언한 이름이어야 함
|
// authGuard는 App\Config\Filters.php의 $aliases에 선언한 이름이어야 함
|
||||||
$routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:manager'], static function ($routes) {
|
$routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:manager'], static function ($routes) {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class BoardController extends AdminController
|
|||||||
$this->_model = new BoardModel();
|
$this->_model = new BoardModel();
|
||||||
$this->_viewDatas['className'] = 'Board';
|
$this->_viewDatas['className'] = 'Board';
|
||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
$this->_viewPath .= strtolower($this->_viewDatas['className']);
|
$this->_viewPath .= strtolower($this->_viewDatas['className']);;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFields(string $action = ""): array
|
public function getFields(string $action = ""): array
|
||||||
|
|||||||
@ -82,7 +82,7 @@ abstract class BaseController extends Controller
|
|||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
default:
|
default:
|
||||||
$rules[$field] = $this->_model->getFieldRule($field, $rules, $action);
|
$rules = $this->_model->getFieldRule($field, $rules, $action);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $rules;
|
return $rules;
|
||||||
|
|||||||
@ -12,6 +12,7 @@ class CartController extends EcommerceController
|
|||||||
{
|
{
|
||||||
$this->_viewDatas['className'] = 'Cart';
|
$this->_viewDatas['className'] = 'Cart';
|
||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
|
$this->_viewPath .= strtolower($this->_viewDatas['className']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFields(string $action = ""): array
|
public function getFields(string $action = ""): array
|
||||||
|
|||||||
@ -22,7 +22,7 @@ abstract class EcommerceController extends BaseController
|
|||||||
{
|
{
|
||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
$this->_session = \Config\Services::session();
|
$this->_session = \Config\Services::session();
|
||||||
$this->_viewPath .= 'ecommerce/';
|
$this->_viewPath = 'ecommerce/';
|
||||||
$this->_viewDatas['control'] = 'front';
|
$this->_viewDatas['control'] = 'front';
|
||||||
$this->_viewDatas['layout'] = LAYOUTS['front'];
|
$this->_viewDatas['layout'] = LAYOUTS['front'];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ class CardController extends PaymentController
|
|||||||
{
|
{
|
||||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
|
$this->_viewDatas['className'] = 'Card';
|
||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
$this->_viewPath .= strtolower($this->_viewDatas['className']);
|
$this->_viewPath .= strtolower($this->_viewDatas['className']);
|
||||||
}
|
}
|
||||||
@ -20,7 +21,7 @@ class CardController extends PaymentController
|
|||||||
{
|
{
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'insert':
|
case 'insert':
|
||||||
return ["order_uid", "card_quota", "card_number", "card_expiration", "email", "mobile"];
|
return ["card_quota", "card_number", "card_expiration", "email", "mobile"];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return [];
|
return [];
|
||||||
@ -83,6 +84,7 @@ class CardController extends PaymentController
|
|||||||
//Insert관련
|
//Insert관련
|
||||||
protected function insert_form_process()
|
protected function insert_form_process()
|
||||||
{
|
{
|
||||||
|
parent::insert_form_process();
|
||||||
$this->_viewDatas['forms'] = ['attributes' => ['method' => "post",], 'hiddens' => ['order_uid' => $this->_viewDatas['order']->getPrimaryKey()]];
|
$this->_viewDatas['forms'] = ['attributes' => ['method' => "post",], 'hiddens' => ['order_uid' => $this->_viewDatas['order']->getPrimaryKey()]];
|
||||||
}
|
}
|
||||||
public function insert_form()
|
public function insert_form()
|
||||||
@ -91,7 +93,6 @@ class CardController extends PaymentController
|
|||||||
$uid = $this->request->getVar('order_uid') ?: throw new \Exception("주문번호가 지정되지 않았습니다.");
|
$uid = $this->request->getVar('order_uid') ?: throw new \Exception("주문번호가 지정되지 않았습니다.");
|
||||||
$this->_viewDatas = $this->init(__FUNCTION__);
|
$this->_viewDatas = $this->init(__FUNCTION__);
|
||||||
$this->_viewDatas['order'] = $this->getOrderModel()->getEntity([$this->getOrderModel()->getPrimaryKey() => $uid]);
|
$this->_viewDatas['order'] = $this->getOrderModel()->getEntity([$this->getOrderModel()->getPrimaryKey() => $uid]);
|
||||||
$this->_viewDatas['user'] = $this->getUserModel()->getEntity([$this->getUserModel()->getPrimaryKey() => $this->_viewDatas['auth'][AUTH_FIELDS['ID']]]);
|
|
||||||
$this->insert_form_process();
|
$this->insert_form_process();
|
||||||
helper(['form']);
|
helper(['form']);
|
||||||
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
||||||
|
|||||||
@ -12,13 +12,14 @@ class DepositController extends PaymentController
|
|||||||
{
|
{
|
||||||
$this->_viewDatas['className'] = 'Deposit';
|
$this->_viewDatas['className'] = 'Deposit';
|
||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
|
$this->_viewPath .= strtolower($this->_viewDatas['className']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFields(string $action = ""): array
|
public function getFields(string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'insert':
|
case 'insert':
|
||||||
return ["order_uid", "email", "mobile"];
|
return ["email", "mobile"];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return [];
|
return [];
|
||||||
@ -56,6 +57,7 @@ class DepositController extends PaymentController
|
|||||||
//Insert관련
|
//Insert관련
|
||||||
protected function insert_form_process()
|
protected function insert_form_process()
|
||||||
{
|
{
|
||||||
|
parent::insert_form_process();
|
||||||
$this->_viewDatas['bank'] = [
|
$this->_viewDatas['bank'] = [
|
||||||
"name" => getenv("payment.deposit.bank.name") ?: "은행명",
|
"name" => getenv("payment.deposit.bank.name") ?: "은행명",
|
||||||
"account" => getenv("payment.deposit.bank.account") ?: "계좌번호",
|
"account" => getenv("payment.deposit.bank.account") ?: "계좌번호",
|
||||||
@ -69,8 +71,10 @@ class DepositController extends PaymentController
|
|||||||
$uid = $this->request->getVar('order_uid') ?: throw new \Exception("주문번호가 지정되지 않았습니다.");
|
$uid = $this->request->getVar('order_uid') ?: throw new \Exception("주문번호가 지정되지 않았습니다.");
|
||||||
$this->_viewDatas = $this->init(__FUNCTION__);
|
$this->_viewDatas = $this->init(__FUNCTION__);
|
||||||
$this->_viewDatas['order'] = $this->getOrderModel()->getEntity([$this->getOrderModel()->getPrimaryKey() => $uid]);
|
$this->_viewDatas['order'] = $this->getOrderModel()->getEntity([$this->getOrderModel()->getPrimaryKey() => $uid]);
|
||||||
|
$this->insert_form_process();
|
||||||
|
helper(['form']);
|
||||||
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
||||||
return view($this->_viewPath . '/deposit', ['viewDatas' => $this->_viewDatas]);
|
return view($this->_viewPath . '/insert', ['viewDatas' => $this->_viewDatas]);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
log_message("error", $e->getMessage());
|
log_message("error", $e->getMessage());
|
||||||
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']) ?: "/")->with('return_message', $e->getMessage());
|
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']) ?: "/")->with('return_message', $e->getMessage());
|
||||||
|
|||||||
@ -36,6 +36,12 @@ abstract class PaymentController extends EcommerceController
|
|||||||
return $this->_categoryModel = $this->_categoryModel ?: new CategoryModel();
|
return $this->_categoryModel = $this->_categoryModel ?: new CategoryModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//insert관련
|
||||||
|
protected function insert_form_process()
|
||||||
|
{
|
||||||
|
parent::insert_form_process();
|
||||||
|
$this->_viewDatas['user'] = $this->getUserModel()->getEntity([$this->getUserModel()->getPrimaryKey() => $this->_viewDatas['auth'][AUTH_FIELDS['ID']]]);
|
||||||
|
}
|
||||||
protected function insert_process()
|
protected function insert_process()
|
||||||
{
|
{
|
||||||
//Order 테이블에 결제완료 처리
|
//Order 테이블에 결제완료 처리
|
||||||
|
|||||||
@ -15,7 +15,7 @@ abstract class FrontController extends BaseController
|
|||||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
$this->_viewPath .= 'front/';
|
$this->_viewPath = 'front/';
|
||||||
$this->_viewDatas['control'] = 'front';
|
$this->_viewDatas['control'] = 'front';
|
||||||
$this->_viewDatas['layout'] = LAYOUTS['front'];
|
$this->_viewDatas['layout'] = LAYOUTS['front'];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
function getFieldLabel_EcommerceHelper($field, array $viewDatas): string
|
function getFieldLabel_CardHelper($field, array $viewDatas): string
|
||||||
{
|
{
|
||||||
$attributes = [];
|
$attributes = [];
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
@ -12,7 +12,7 @@ function getFieldLabel_EcommerceHelper($field, array $viewDatas): string
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//header.php에서 getFieldForm_Helper사용
|
//header.php에서 getFieldForm_Helper사용
|
||||||
function getFieldForm_EcommerceHelper($field, $value, array $viewDatas, array $attributes = array())
|
function getFieldForm_CardHelper($field, $value, array $viewDatas, array $attributes = array())
|
||||||
{
|
{
|
||||||
$value = $value ?: DEFAULTS['EMPTY'];
|
$value = $value ?: DEFAULTS['EMPTY'];
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
@ -58,7 +58,7 @@ function getFieldForm_EcommerceHelper($field, $value, array $viewDatas, array $a
|
|||||||
}
|
}
|
||||||
} //
|
} //
|
||||||
|
|
||||||
function getFieldView_EcommerceHelper($field, $entity, array $viewDatas)
|
function getFieldView_CardHelper($field, $entity, array $viewDatas)
|
||||||
{
|
{
|
||||||
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
@ -68,13 +68,13 @@ function getFieldView_EcommerceHelper($field, $entity, array $viewDatas)
|
|||||||
}
|
}
|
||||||
} //
|
} //
|
||||||
|
|
||||||
function getFieldFilter_EcommerceHelper($field, $value, array $viewDatas)
|
function getFieldFilter_CardHelper($field, $value, array $viewDatas)
|
||||||
{
|
{
|
||||||
$viewDatas['fieldFormOptions'][$field] = [DEFAULTS['EMPTY'] => lang("{$viewDatas['className']}.label.{$field}") . " 선택", ...$viewDatas['fieldFormOptions'][$field]];
|
$viewDatas['fieldFormOptions'][$field] = [DEFAULTS['EMPTY'] => lang("{$viewDatas['className']}.label.{$field}") . " 선택", ...$viewDatas['fieldFormOptions'][$field]];
|
||||||
return form_dropdown($field, $viewDatas['fieldFormOptions'][$field], $value, ['class' => "select-field"]);
|
return form_dropdown($field, $viewDatas['fieldFormOptions'][$field], $value, ['class' => "select-field"]);
|
||||||
} //
|
} //
|
||||||
|
|
||||||
function getFieldIndex_Column_EcommerceHelper($field, array $viewDatas)
|
function getFieldIndex_Column_CardHelper($field, array $viewDatas)
|
||||||
{
|
{
|
||||||
$label = lang("{$viewDatas['className']}.label.{$field}");
|
$label = lang("{$viewDatas['className']}.label.{$field}");
|
||||||
if ($field == $viewDatas['order_field']) {
|
if ($field == $viewDatas['order_field']) {
|
||||||
@ -92,12 +92,12 @@ function getFieldIndex_Column_EcommerceHelper($field, array $viewDatas)
|
|||||||
} //
|
} //
|
||||||
|
|
||||||
//Front용
|
//Front용
|
||||||
function getFieldIndex_Row_EcommerceHelper($field, $entity, array $viewDatas): string
|
function getFieldIndex_Row_CardHelper($field, $entity, array $viewDatas): string
|
||||||
{
|
{
|
||||||
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
default:
|
default:
|
||||||
return sprintf("<td>%s</td>", getFieldView_EcommerceHelper($field, $entity, $viewDatas));
|
return sprintf("<td>%s</td>", getFieldView_CardHelper($field, $entity, $viewDatas));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} //
|
} //
|
||||||
74
app/Helpers/Deposit_helper.php
Normal file
74
app/Helpers/Deposit_helper.php
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<?php
|
||||||
|
function getFieldLabel_DepositHelper($field, array $viewDatas): string
|
||||||
|
{
|
||||||
|
$attributes = [];
|
||||||
|
switch ($field) {
|
||||||
|
default:
|
||||||
|
if (strpos($viewDatas['fieldRules'][$field], 'required') !== false) {
|
||||||
|
$attributes = ['style="color:red";'];
|
||||||
|
}
|
||||||
|
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("{$viewDatas['className']}.label.{$field}"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//header.php에서 getFieldForm_Helper사용
|
||||||
|
function getFieldForm_DepositHelper($field, $value, array $viewDatas, array $attributes = array())
|
||||||
|
{
|
||||||
|
$value = $value ?: DEFAULTS['EMPTY'];
|
||||||
|
switch ($field) {
|
||||||
|
|
||||||
|
case 'email':
|
||||||
|
return form_input($field, $viewDatas['user']->email);
|
||||||
|
break;
|
||||||
|
case 'mobile':
|
||||||
|
return form_input($field, $viewDatas['user']->mobile);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return form_input($field, $value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} //
|
||||||
|
|
||||||
|
function getFieldView_DepositHelper($field, $entity, array $viewDatas)
|
||||||
|
{
|
||||||
|
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||||
|
switch ($field) {
|
||||||
|
default:
|
||||||
|
return in_array($field, $viewDatas['fieldFilters']) && $value ? $viewDatas['fieldFormOptions'][$field][$value] : $value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} //
|
||||||
|
|
||||||
|
function getFieldFilter_DepositHelper($field, $value, array $viewDatas)
|
||||||
|
{
|
||||||
|
$viewDatas['fieldFormOptions'][$field] = [DEFAULTS['EMPTY'] => lang("{$viewDatas['className']}.label.{$field}") . " 선택", ...$viewDatas['fieldFormOptions'][$field]];
|
||||||
|
return form_dropdown($field, $viewDatas['fieldFormOptions'][$field], $value, ['class' => "select-field"]);
|
||||||
|
} //
|
||||||
|
|
||||||
|
function getFieldIndex_Column_DepositHelper($field, array $viewDatas)
|
||||||
|
{
|
||||||
|
$label = lang("{$viewDatas['className']}.label.{$field}");
|
||||||
|
if ($field == $viewDatas['order_field']) {
|
||||||
|
$label .= $viewDatas['order_value'] == 'ASC' ? ICONS['UP'] : ICONS['DOWN'];
|
||||||
|
}
|
||||||
|
$value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
|
||||||
|
$viewDatas['uri']->addQuery('order_field', $field);
|
||||||
|
$viewDatas['uri']->addQuery('order_value', $value);
|
||||||
|
$columnData = anchor($viewDatas['uri'], $label);
|
||||||
|
switch ($field) {
|
||||||
|
default:
|
||||||
|
return sprintf("<th>%s</th>", $columnData);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} //
|
||||||
|
|
||||||
|
//Front용
|
||||||
|
function getFieldIndex_Row_DepositHelper($field, $entity, array $viewDatas): string
|
||||||
|
{
|
||||||
|
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||||
|
switch ($field) {
|
||||||
|
default:
|
||||||
|
return sprintf("<td>%s</td>", getFieldView_DepositHelper($field, $entity, $viewDatas));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} //
|
||||||
@ -140,12 +140,12 @@ function getFieldIndex_Row_OrderHelper($field, $entity, array $viewDatas): strin
|
|||||||
return sprintf(
|
return sprintf(
|
||||||
"<td nowrap class=\"text-start\"><div class=\"payment\">%s</div><div class=\"payment\">%s</div><div class=\"payment\">%s</div></td>",
|
"<td nowrap class=\"text-start\"><div class=\"payment\">%s</div><div class=\"payment\">%s</div><div class=\"payment\">%s</div></td>",
|
||||||
anchor(
|
anchor(
|
||||||
URLS['paymentCard'] . '/' . $entity->getPrimaryKey(),
|
URLS['paymentCard'] . '?order_uid=' . $entity->getPrimaryKey(),
|
||||||
"카드결제",
|
"카드결제",
|
||||||
["class" => "btn btn-sm btn-primary btn-circle", "style" => "color:white", "target" => "_self"]
|
["class" => "btn btn-sm btn-primary btn-circle", "style" => "color:white", "target" => "_self"]
|
||||||
),
|
),
|
||||||
anchor(
|
anchor(
|
||||||
URLS['depositPayment'] . '/' . $entity->getPrimaryKey(),
|
URLS['paymentDeposit'] . '?order_uid=' . $entity->getPrimaryKey(),
|
||||||
"무통장입금",
|
"무통장입금",
|
||||||
["class" => "btn btn-sm btn-info btn-circle", "style" => "color:white", "target" => "_self"]
|
["class" => "btn btn-sm btn-info btn-circle", "style" => "color:white", "target" => "_self"]
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'title' => "결제 정보",
|
'title' => "카드결제",
|
||||||
'label' => [
|
'label' => [
|
||||||
|
'order_uid' => '주문번호',
|
||||||
'card_quota' => '카드할부',
|
'card_quota' => '카드할부',
|
||||||
'card_number' => '카드번호',
|
'card_number' => '카드번호',
|
||||||
'card_expiration' => '유효기간',
|
'card_expiration' => '유효기간',
|
||||||
9
app/Language/ko/Deposit.php
Normal file
9
app/Language/ko/Deposit.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
return [
|
||||||
|
'title' => "무통장입금결제",
|
||||||
|
'label' => [
|
||||||
|
'order_uid' => '주문번호',
|
||||||
|
'email' => '이메일',
|
||||||
|
'mobile' => '휴대폰(인증용)',
|
||||||
|
],
|
||||||
|
];
|
||||||
@ -19,7 +19,7 @@ abstract class BaseHierarchyModel extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->getEntitys(['grpno' => $entity->getHierarchy_No()]);
|
return $this->getEntitys(['grpno' => $entity->getHierarchy_No()]);
|
||||||
}
|
}
|
||||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case "grpno":
|
case "grpno":
|
||||||
|
|||||||
@ -73,7 +73,7 @@ abstract class BaseModel extends Model
|
|||||||
{
|
{
|
||||||
return $this->where($conditions)->findAll();
|
return $this->where($conditions)->findAll();
|
||||||
}
|
}
|
||||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case $this->primaryKey:
|
case $this->primaryKey:
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class BoardModel extends BaseHierarchyModel
|
|||||||
{
|
{
|
||||||
return 'content';
|
return 'content';
|
||||||
}
|
}
|
||||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case "category_uid":
|
case "category_uid":
|
||||||
|
|||||||
@ -26,7 +26,7 @@ class CategoryModel extends BaseHierarchyModel
|
|||||||
{
|
{
|
||||||
return 'head';
|
return 'head';
|
||||||
}
|
}
|
||||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case $this->getTitleField():
|
case $this->getTitleField():
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class OrderModel extends BaseModel
|
|||||||
{
|
{
|
||||||
return 'name';
|
return 'name';
|
||||||
}
|
}
|
||||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'product_uid':
|
case 'product_uid':
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class PaymentModel extends BaseModel
|
|||||||
{
|
{
|
||||||
return 'name';
|
return 'name';
|
||||||
}
|
}
|
||||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'product_uid':
|
case 'product_uid':
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class ProductModel extends BaseModel
|
|||||||
return 'name';
|
return 'name';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case "category_uid":
|
case "category_uid":
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class SitepageModel extends BaseModel
|
|||||||
{
|
{
|
||||||
return 'content';
|
return 'content';
|
||||||
}
|
}
|
||||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case "category_uid":
|
case "category_uid":
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class UserModel extends BaseModel
|
|||||||
{
|
{
|
||||||
return 'name';
|
return 'name';
|
||||||
}
|
}
|
||||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case "id":
|
case "id":
|
||||||
|
|||||||
@ -22,7 +22,7 @@ class UserSNSModel extends BaseModel
|
|||||||
return 'name';
|
return 'name';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case "id":
|
case "id":
|
||||||
|
|||||||
@ -15,9 +15,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label"><?= getFieldLabel_EcommerceHelper($field, $viewDatas) ?></td>
|
<td class="label"><?= getFieldLabel_CardHelper($field, $viewDatas) ?></td>
|
||||||
<td class="column">
|
<td class="column">
|
||||||
<?= getFieldForm_EcommerceHelper($field, old($field, DEFAULTS['EMPTY']), $viewDatas) ?>
|
<?= getFieldForm_CardHelper($field, old($field, DEFAULTS['EMPTY']), $viewDatas) ?>
|
||||||
<?= validation_show_error($field); ?>
|
<?= validation_show_error($field); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -27,9 +27,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label"><?= getFieldLabel_EcommerceHelper($field, $viewDatas) ?></td>
|
<td class="label"><?= getFieldLabel_DepositHelper($field, $viewDatas) ?></td>
|
||||||
<td class="column">
|
<td class="column">
|
||||||
<?= getFieldForm_EcommerceHelper($field, old($field, DEFAULTS['EMPTY']), $viewDatas) ?>
|
<?= getFieldForm_DepositHelper($field, old($field, DEFAULTS['EMPTY']), $viewDatas) ?>
|
||||||
<?= validation_show_error($field); ?>
|
<?= validation_show_error($field); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -47,7 +47,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?= form_close(); ?>
|
<?= form_close(); ?>
|
||||||
<div><?= html_entity_decode($viewDatas['category']->tail) ?></div>
|
|
||||||
</table>
|
</table>
|
||||||
<div><?= html_entity_decode($viewDatas['category']->tail) ?></div>
|
<div><?= html_entity_decode($viewDatas['category']->tail) ?></div>
|
||||||
</div>
|
</div>
|
||||||
Loading…
Reference in New Issue
Block a user