shoppingmallv2 init..
This commit is contained in:
parent
f0ae0902b7
commit
4b63faa113
@ -176,10 +176,11 @@ $routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($rou
|
||||
$routes->group('billing', ['namespace' => 'App\Controllers\Front\Billing', 'filter' => 'authFilter:user'], static function ($routes) {
|
||||
$routes->get('', 'BillingController::index');
|
||||
$routes->post('', 'BillingController::insert');
|
||||
$routes->get('card', 'CardController::insert_form');
|
||||
$routes->post('card', 'CardController::insert');
|
||||
$routes->get('deposit', 'DepositController::insert_form');
|
||||
$routes->post('deposit', 'DepositController::insert');
|
||||
$routes->get('view/(:num)', 'BillingController::view/$1');
|
||||
$routes->get('card/(:num)', 'CardController::update_form/$1');
|
||||
$routes->post('card/(:num)', 'CardController::update/$1');
|
||||
$routes->get('deposit/(:num)', 'DepositController::update_form/$1');
|
||||
$routes->post('deposit/(:num)', 'DepositController::update/$1');
|
||||
});
|
||||
});
|
||||
/*
|
||||
|
||||
@ -20,27 +20,30 @@ class BillingController extends AdminController
|
||||
helper($this->_viewDatas['className']);
|
||||
}
|
||||
|
||||
final public function getFields(string $action = ""): array
|
||||
public function getFields(string $action = ""): array
|
||||
{
|
||||
switch ($action) {
|
||||
case "insert":
|
||||
return ["price"];
|
||||
break;
|
||||
case "index":
|
||||
case "excel":
|
||||
return ["email", "phone", "title", "upload_file", "status", "updated_at", "created_at"];
|
||||
return ["user_uid", "title", "price", "email", "phone", "status", "updated_at", "created_at"];
|
||||
break;
|
||||
case "view":
|
||||
return ["user_uid", 'order_uid', "email", "phone", "title", "upload_file", "status", "updated_at", "created_at", 'response'];
|
||||
return ["user_uid", "title", "price", "email", "phone", "status", "updated_at", "created_at", 'response'];
|
||||
break;
|
||||
default:
|
||||
return [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
final public function getFieldFilters(): array
|
||||
public function getFieldFilters(): array
|
||||
{
|
||||
return ["user_uid", 'order_uid', "status"];
|
||||
return ["user_uid", "status"];
|
||||
}
|
||||
final public function getFieldBatchFilters(): array
|
||||
public function getFieldBatchFilters(): array
|
||||
{
|
||||
return ["status"];
|
||||
return ["user_uid", "status"];
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,10 +58,10 @@ class BillingController extends FrontController
|
||||
break;
|
||||
case "index":
|
||||
case "excel":
|
||||
return ["email", "phone", "title", "price", "status", "updated_at", "created_at"];
|
||||
return ["title", "price", "email", "phone", "status", "created_at"];
|
||||
break;
|
||||
case "view":
|
||||
return ["email", "phone", "title", "price", "status", "updated_at", "created_at", 'response'];
|
||||
return ["type", "title", "price", "email", "phone", "status", "updated_at", "created_at", 'response'];
|
||||
break;
|
||||
default:
|
||||
return [];
|
||||
@ -77,6 +77,22 @@ class BillingController extends FrontController
|
||||
return ["status"];
|
||||
}
|
||||
|
||||
final protected function getOrdersByBillingEntity(BillingEntity $entity): array
|
||||
{
|
||||
//청구서 연결 주문정보 가져오기
|
||||
$orderBillings = $this->getOrderBillingModel()->getEntitys(['billing_uid' => $entity->getPrimaryKey()]);
|
||||
$orders = array();
|
||||
foreach ($orderBillings as $orderBilling) {
|
||||
array_push(
|
||||
$orders,
|
||||
$this->getOrderModel()->getEntity(
|
||||
[$this->getOrderModel()->getPrimaryKey() => $orderBilling->order_uid]
|
||||
)
|
||||
);
|
||||
}
|
||||
return $orders;
|
||||
}
|
||||
|
||||
//Insert관련 (결제처리용)
|
||||
protected function insert_form_process()
|
||||
{
|
||||
@ -84,13 +100,14 @@ class BillingController extends FrontController
|
||||
}
|
||||
|
||||
//Insert관련
|
||||
private function linkOrderBilling(BillingEntity $entity, array $order_uids)
|
||||
private function linkOrderBilling(BillingEntity $entity, array $orders)
|
||||
{
|
||||
foreach ($order_uids as $order_uid) {
|
||||
foreach ($orders as $order) {
|
||||
$this->getOrderBillingModel()->create([
|
||||
"billing_uid" => $entity->getPrimaryKey(),
|
||||
'order_uid' => $order_uid
|
||||
'order_uid' => $order->getPrimaryKey()
|
||||
]);
|
||||
$this->getOrderModel()->modify($order, ['status' => DEFAULTS['STATUS']]);
|
||||
}
|
||||
}
|
||||
protected function insert_process()
|
||||
@ -110,12 +127,16 @@ class BillingController extends FrontController
|
||||
$this->insert_validate();
|
||||
//주문정보 가져오기
|
||||
$order_uids = $this->request->getVar('order_uids') ?: throw new \Exception("주문정보가 지정되지 않았습니다.");
|
||||
$orders = array();
|
||||
foreach ($order_uids as $order_uid) {
|
||||
array_push($orders, $this->getOrderModel()->getEntity([$this->getOrderModel()->getPrimaryKey() => $order_uid]));
|
||||
}
|
||||
//Transaction 시작
|
||||
$this->_model->transStart();
|
||||
//Billing 생성
|
||||
$entity = $this->insert_process();
|
||||
//DB연결용
|
||||
$this->linkOrderBilling($entity, $order_uids);
|
||||
$this->linkOrderBilling($entity, $orders);
|
||||
//Transaction Commit
|
||||
$this->_model->transComplete();
|
||||
$msg = "{$this->_viewDatas['title']}에서 {$entity->getTitle()}의 " . __FUNCTION__ . " 완료하였습니다.";
|
||||
@ -135,6 +156,17 @@ class BillingController extends FrontController
|
||||
}
|
||||
}
|
||||
|
||||
//View 관련
|
||||
protected function view_process($entity)
|
||||
{
|
||||
$entity = parent::view_process($entity);
|
||||
//청구서 연결 주문정보 가져오기
|
||||
$this->_viewDatas['orders'] = $this->getOrdersByBillingEntity($entity);
|
||||
if (!count($this->_viewDatas['orders'])) {
|
||||
throw new \Exception("해당하는 주문정보가 없습니다.");
|
||||
}
|
||||
return $entity;
|
||||
}
|
||||
|
||||
//Index관련
|
||||
protected function index_setCondition()
|
||||
@ -146,36 +178,21 @@ class BillingController extends FrontController
|
||||
}
|
||||
|
||||
//추가기능
|
||||
//청구서관련
|
||||
final protected function createBilling(OrderEntity $entity, string $subject, string $html, $response = ''): BillingEntity
|
||||
{
|
||||
//청구서파일 생성
|
||||
$fileName = sprintf("%s_%s", $entity->getPrimaryKey(), date('Y-m-d_Hm') . '.xlsx');
|
||||
$writer = $this->spreadSheet($html);
|
||||
$writer->save(PATHS['BILLING'] . '/' . $fileName);
|
||||
//메일발송
|
||||
$this->sendBilling($this->_viewDatas['fieldDatas']['email'], $subject, $html);
|
||||
$fieldDatas = [
|
||||
'order_uid' => $entity->getPrimaryKey(),
|
||||
'user_uid' => $this->_viewDatas['auth'][AUTH_FIELDS['ID']],
|
||||
'email' => $this->_viewDatas['fieldDatas']['email'],
|
||||
'phone' => $this->_viewDatas['fieldDatas']['phone'],
|
||||
'title' => $subject,
|
||||
'content' => $html,
|
||||
'upload_file' => sprintf("%s%s%s", $this->_viewDatas['className'] . '.xlsx', DEFAULTS['DELIMITER_FILE'], $fileName),
|
||||
'response' => $response,
|
||||
'status' => DEFAULTS['STATUS']
|
||||
];
|
||||
return $this->_model->create($fieldDatas);
|
||||
}
|
||||
final protected function sendBilling($email, string $subject, string $html): bool
|
||||
final protected function sendMail(BillingEntity $entity): bool
|
||||
{
|
||||
$this->_viewDatas = $this->init(__FUNCTION__);
|
||||
$this->_viewDatas['entity'] = $entity;
|
||||
$this->_viewDatas['orders'] = $this->getOrdersByBillingEntity($entity);
|
||||
|
||||
$mail = \Config\Services::email();
|
||||
$mail->setFrom(MALLS['support'], MALLS['title'], MALLS['master']);
|
||||
$mail->setTo($email);
|
||||
$mail->setTo($entity->email);
|
||||
$mail->setCC(MALLS['master']);
|
||||
$mail->setSubject($subject);
|
||||
$mail->setMessage($html);
|
||||
$mail->setSubject($entity->getTitle());
|
||||
$mail->setMessage(view(
|
||||
$this->_viewPath . '/billing',
|
||||
['viewDatas' => $this->_viewDatas]
|
||||
));
|
||||
return $mail->send();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Front\Billing\Payment;
|
||||
namespace App\Controllers\Front\Billing;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class DepositController extends PaymentController
|
||||
class DepositController extends BillingController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
@ -21,7 +21,7 @@ class DepositController extends PaymentController
|
||||
public function getFields(string $action = ""): array
|
||||
{
|
||||
switch ($action) {
|
||||
case 'insert':
|
||||
case 'update':
|
||||
return ["email", "phone"];
|
||||
break;
|
||||
default:
|
||||
@ -38,15 +38,6 @@ class DepositController extends PaymentController
|
||||
case "phone":
|
||||
$rules[$field] = 'required|regex_match[/^[0-9]{3}-[0-9]{4}-[0-9]{4}/]';
|
||||
break;
|
||||
case "title":
|
||||
$rules[$field] = 'required|string';
|
||||
break;
|
||||
case "price":
|
||||
$rules[$field] = 'required|numeric';
|
||||
break;
|
||||
case "content":
|
||||
$rules[$field] = 'required|string';
|
||||
break;
|
||||
default:
|
||||
$rules = parent::getFieldRule($field, $rules, $action);
|
||||
break;
|
||||
@ -62,30 +53,22 @@ class DepositController extends PaymentController
|
||||
return parent::getFieldBatchFilters();
|
||||
}
|
||||
|
||||
//Insert관련
|
||||
protected function insert_form_process()
|
||||
{
|
||||
parent::insert_form_process();
|
||||
$this->_viewDatas['forms'] = ['attributes' => ['method' => "post",], 'hiddens' => ['price' => $this->_viewDatas['price']]];
|
||||
}
|
||||
public function insert_form()
|
||||
//Update관련
|
||||
public function update_form($uid)
|
||||
{
|
||||
try {
|
||||
$this->_viewDatas = $this->init(__FUNCTION__);
|
||||
//결제금액 가져오기
|
||||
$this->_viewDatas['price'] = $this->request->getVar('price') ?: throw new \Exception("결제금액이 지정되지 않았습니다.");
|
||||
//주문정보 가져오기
|
||||
$order_uids = $this->request->getVar('order_uids') ?: throw new \Exception("주문정보가 지정되지 않았습니다.");
|
||||
// echo var_export($order_uids, true);
|
||||
// exit;
|
||||
$this->_viewDatas['orders'] = $this->getOrderModel()->whereIn($this->getOrderModel()->getPrimaryKey(), $order_uids)->findAll();
|
||||
//청구서정보 가져오기
|
||||
$this->_viewDatas['entity'] = $entity = $this->_model->getEntity([$this->_model->getPrimaryKey() => $uid]);
|
||||
//청구서 연결 주문정보 가져오기
|
||||
$this->_viewDatas['orders'] = $this->getOrdersByBillingEntity($entity);
|
||||
if (!count($this->_viewDatas['orders'])) {
|
||||
throw new \Exception("해당하는 주문정보가 없습니다.");
|
||||
}
|
||||
$this->insert_form_process();
|
||||
$this->update_form_process($entity);
|
||||
helper(['form']);
|
||||
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
||||
return view($this->_viewPath . '/insert', ['viewDatas' => $this->_viewDatas]);
|
||||
return view($this->_viewPath . '/update', ['viewDatas' => $this->_viewDatas]);
|
||||
} catch (\Exception $e) {
|
||||
log_message("error", $e->getMessage());
|
||||
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']) ?: "/")->with('return_message', $e->getMessage());
|
||||
@ -94,16 +77,8 @@ class DepositController extends PaymentController
|
||||
//무통장입금결제처리
|
||||
protected function update_process($entity)
|
||||
{
|
||||
//청구서 발행정보
|
||||
$this->_viewDatas['entity'] = $entity;
|
||||
$subject = sprintf("%s %s 청구서입니다.", $entity->getTitle(), date("Y년 m월"));
|
||||
$html = view(
|
||||
$this->_viewPath . '/billing',
|
||||
['viewDatas' => $this->_viewDatas]
|
||||
);
|
||||
//결과파일저장
|
||||
$this->createBilling($entity, $subject, $html);
|
||||
$this->_viewDatas['fieldDatas']["type"] = $this->_viewDatas['className'];
|
||||
//결제처리
|
||||
return $this->_model->modify($entity, ["status" => $this->_viewDatas['className']]);
|
||||
return parent::update_process($entity);
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ DROP TABLE IF EXISTS shoppingmall.tw_billing;
|
||||
CREATE TABLE shoppingmall.tw_billing (
|
||||
uid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
user_uid varchar(36) NOT NULL COMMENT '사용자 정보',
|
||||
type varchar(10) NULL DEFAULT 'Card' COMMENT 'Card: 카드결제, Deposit:무통장입금',
|
||||
type varchar(10) NULL COMMENT 'Card: 카드결제, Deposit:무통장입금',
|
||||
email varchar(50) NOT NULL,
|
||||
phone varchar(20) NULL COMMENT '연락처',
|
||||
title varchar(255) NOT NULL COMMENT '청구서제목',
|
||||
|
||||
@ -73,14 +73,7 @@ function getFieldView_BillingHelper($field, $entity, array $viewDatas)
|
||||
return number_format(!$value ? 0 : $value) . "원";
|
||||
break;
|
||||
case 'price':
|
||||
$price = number_format(!$value ? 0 : $value) . "원";
|
||||
$paymentday = $entity->paymentday;
|
||||
return sprintf(
|
||||
"%s:%s<BR>%s",
|
||||
lang("{$viewDatas['className']}.label.paymentday"),
|
||||
$paymentday,
|
||||
$price
|
||||
);
|
||||
return number_format(!$value ? 0 : $value) . "원";
|
||||
break;
|
||||
case 'stock':
|
||||
case 'view_cnt':
|
||||
@ -121,7 +114,7 @@ function getFieldIndex_Column_BillingHelper($field, array $viewDatas)
|
||||
switch ($field) {
|
||||
case 'title':
|
||||
case 'name':
|
||||
return sprintf("<th class='col-4'>%s</th>", $columnData);
|
||||
return sprintf("<th class='col-3'>%s</th>", $columnData);
|
||||
break;
|
||||
default:
|
||||
return sprintf("<th>%s</th>", $columnData);
|
||||
@ -161,18 +154,19 @@ function getFieldIndex_Row_BillingHelper($field, $entity, array $viewDatas): str
|
||||
//미납인경우
|
||||
if ($value == DEFAULTS['STATUS']) {
|
||||
$card = anchor(
|
||||
URLS['cardPayment'] . '/' . $entity->getPrimaryKey(),
|
||||
ICONS['CARD'] . lang("{$viewDatas['className']}.PAYMENT.CARD"),
|
||||
URLS['card'] . '/' . $entity->getPrimaryKey(),
|
||||
ICONS['CARD'] . lang("{$viewDatas['className']}.TYPE.CARD"),
|
||||
["class" => "btn btn-sm btn-primary btn-circle", "style" => "color:white", "target" => "_self"]
|
||||
);
|
||||
$deposit = anchor(
|
||||
URLS['depositPayment'] . '/' . $entity->getPrimaryKey(),
|
||||
ICONS['DEPOSIT'] . lang("{$viewDatas['className']}.PAYMENT.DEPOSIT"),
|
||||
URLS['deposit'] . '/' . $entity->getPrimaryKey(),
|
||||
ICONS['DEPOSIT'] . lang("{$viewDatas['className']}.TYPE.DEPOSIT"),
|
||||
["class" => "btn btn-sm btn-info btn-circle", "style" => "color:white", "target" => "_self"]
|
||||
);
|
||||
return sprintf("%s<BR>%s", $card, $deposit);
|
||||
} else {
|
||||
return getFieldView_OrderHelper($field, $entity, $viewDatas);
|
||||
//결제처리가된경우
|
||||
return getFieldView_OrderHelper('type', $entity, $viewDatas);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -3,12 +3,13 @@ return [
|
||||
'title' => "청구서 정보",
|
||||
'label' => [
|
||||
'uid' => "청구서번호",
|
||||
'order_uid' => "주문정보",
|
||||
'user_uid' => "사용자정보",
|
||||
'type' => "결제방식",
|
||||
'email' => "메일",
|
||||
'phone' => "연라처",
|
||||
'title' => "청구서명",
|
||||
'price' => "청구금액",
|
||||
'upload_file' => "청구서파일",
|
||||
'response' => "결제처리결과",
|
||||
'response' => "결제결과",
|
||||
'status' => "상태",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "작성일"
|
||||
@ -17,7 +18,7 @@ return [
|
||||
"use" => "미납",
|
||||
"unuse" => "납부완료",
|
||||
],
|
||||
"PAYMENT" => [
|
||||
"TYPE" => [
|
||||
'CARD' => " 카 드 결 제",
|
||||
'DEPOSIT' => " 무통장입금",
|
||||
]
|
||||
|
||||
@ -9,7 +9,6 @@ class BillingModel extends BaseModel
|
||||
private $_order_options = null;
|
||||
protected $table = "tw_billing";
|
||||
protected $returnType = BillingEntity::class;
|
||||
protected $useSoftDeletes = true;
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('Billing');
|
||||
|
||||
37
app/Views/front/billing/billing.php
Normal file
37
app/Views/front/billing/billing.php
Normal file
@ -0,0 +1,37 @@
|
||||
<link href="<?= base_url() . "/css/front/content.css" ?>" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<table class="form table table-bordered table-hover table-striped">
|
||||
<tr>
|
||||
<td class="label">주문정보</td>
|
||||
<td class="column">
|
||||
<ul class="orders">
|
||||
<?php foreach ($viewDatas['orders'] as $order) : ?>
|
||||
<li class="text-start"><?= $order->getTitle() ?> * <?= $order->quantity ?>개 = <?= number_format($order->price) ?>원</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">결제금액</td>
|
||||
<td class="column"><?= number_format($viewDatas['entity']->price) ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">은행정보</td>
|
||||
<td class="column">
|
||||
<ul class="banks">
|
||||
<?php foreach (MALLS['banks'] as $bank) : ?>
|
||||
<li><?= $bank['name'] ?> , <?= $bank['account'] ?> , <?= $bank['holder'] ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
||||
<tr>
|
||||
<td class="label"><?= getFieldLabel_BillingHelper($field, $viewDatas) ?></td>
|
||||
<td class="column">
|
||||
<?= getFieldView_BillingHelper($field, $viewDatas['entity'], $viewDatas) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
@ -17,7 +17,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">결제금액</td>
|
||||
<td class="column"><?= number_format($viewDatas['price']) ?>원</td>
|
||||
<td class="column"><?= number_format($viewDatas['entity']->price) ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">은행정보</td>
|
||||
42
app/Views/front/billing/view.php
Normal file
42
app/Views/front/billing/view.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?= $this->extend('layouts/front') ?>
|
||||
<?= $this->section('content') ?>
|
||||
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div><?= html_entity_decode($viewDatas['category']->head) ?></div>
|
||||
<table class="form table table-bordered table-hover table-striped">
|
||||
<tr>
|
||||
<td class="label">주문정보</td>
|
||||
<td class="column">
|
||||
<ul class="orders">
|
||||
<?php foreach ($viewDatas['orders'] as $order) : ?>
|
||||
<li class="text-start"><?= $order->getTitle() ?> * <?= $order->quantity ?>개 = <?= number_format($order->price) ?>원</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">결제금액</td>
|
||||
<td class="column"><?= number_format($viewDatas['entity']->price) ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">은행정보</td>
|
||||
<td class="column">
|
||||
<ul class="banks">
|
||||
<?php foreach (MALLS['banks'] as $bank) : ?>
|
||||
<li><?= $bank['name'] ?> , <?= $bank['account'] ?> , <?= $bank['holder'] ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
||||
<tr>
|
||||
<td class="label"><?= getFieldLabel_BillingHelper($field, $viewDatas) ?></td>
|
||||
<td class="column">
|
||||
<?= getFieldView_BillingHelper($field, $viewDatas['entity'], $viewDatas) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<div><?= html_entity_decode($viewDatas['category']->tail) ?></div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -34,9 +34,11 @@
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $total_price += $entity->price ?>
|
||||
<?php $total_sale += $entity->sale ?>
|
||||
<?php $cnt++ ?>
|
||||
<?php if ($entity->status == 'unuse') : ?>
|
||||
<?php $total_price += $entity->price ?>
|
||||
<?php $total_sale += $entity->sale ?>
|
||||
<?php $cnt++ ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -52,7 +54,7 @@
|
||||
<div class="title">결제정보</div>
|
||||
<div class="item">
|
||||
<span class="label">상품수</span>
|
||||
<span class="value"><?= count($viewDatas['entitys']) ?>개</span>
|
||||
<span class="value"><?= $cnt ?>개</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">상품금액</span>
|
||||
@ -67,7 +69,11 @@
|
||||
<span class="value"><?= number_format($price) ?>원</span>
|
||||
</div>
|
||||
<div class="item submit">
|
||||
<?= form_submit('', '구매하기', array('', "class" => "btn btn-outline btn-primary")); ?>
|
||||
<?php if ($price) : ?>
|
||||
<?= form_submit('', '구매하기', array('', "class" => "btn btn-outline btn-primary")); ?>
|
||||
<?php else : ?>
|
||||
결제할 주문건수가 없습니다.
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?= form_close(); ?>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user