shoppingmallv2 init...

This commit is contained in:
최준흠git config git config --helpgit config --global user.name 최준흠 2023-08-02 21:58:17 +09:00
parent 03f2e8ea3e
commit 49f00453ed
6 changed files with 12 additions and 11 deletions

View File

@ -39,9 +39,9 @@ $routes->get('/login', 'AuthController::login');
$routes->post('/signup', 'AuthController::signup/local');
$routes->get('/signup/(:alpha)', 'AuthController::signup/$1');
$routes->get('/logout', 'AuthController::logout');
$routes->group('cart', ['namespace' => 'App\Controllers'], static function ($routes) {
$routes->post('addCart', 'CartController::addCart');
$routes->get('cancelCart/(:uuid)', 'CartController::cancelCart/$1');
$routes->group('ecommerce', ['namespace' => 'App\Controllers'], static function ($routes) {
$routes->post('addCart', 'EcommerceController::addCart');
$routes->get('cancelCart/(:uuid)', 'EcommerceController::cancelCart/$1');
});;
$routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) {
});

View File

@ -39,9 +39,9 @@ $routes->get('/login', 'AuthController::login');
$routes->post('/signup', 'AuthController::signup/local');
$routes->get('/signup/(:alpha)', 'AuthController::signup/$1');
$routes->get('/logout', 'AuthController::logout');
$routes->group('cart', ['namespace' => 'App\Controllers'], static function ($routes) {
$routes->post('addCart', 'CartController::addCart');
$routes->get('cancelCart/(:uuid)', 'CartController::cancelCart/$1');
$routes->group('ecommerce', ['namespace' => 'App\Controllers'], static function ($routes) {
$routes->post('addCart', 'EcommerceController::addCart');
$routes->get('cancelCart/(:uuid)', 'EcommerceController::cancelCart/$1');
});;
$routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) {
});
@ -124,8 +124,9 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
$routes->group('order', static function ($routes) {
$routes->get('', 'OrderController::index');
$routes->get('view/(:uuid)', 'OrderController::view/$1');
$routes->post('batchjob', 'OrderController::batchjob`');
$routes->get('delete/(:uuid)', 'OrderController::delete/$1', ['filter' => 'authFilter:master']);
$routes->get('toggle/(:uuid)/(:hash)', 'OrderController::toggle/$1/$2');
$routes->post('batchjob', 'OrderController::batchjob`');
});
});
$routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) {

View File

@ -11,7 +11,7 @@ use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
class CartController extends Controller
class EcommerceController extends Controller
{
/**
* Instance of the main Request object.

View File

@ -27,7 +27,7 @@
<td nowrap><?= getFieldIndex_Row_OrderHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
<td>
<?= $entity->getStatus() == DEFAULTS['STATUS'] ? anchor('cart/cancelCart/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) : "" ?>
<?= $entity->getStatus() == DEFAULTS['STATUS'] ? anchor('ecommerce/cancelCart/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) : "" ?>
</td>
</tr>
<?php $i++; ?>

View File

@ -25,7 +25,7 @@
<td nowrap><?= getFieldView_OrderHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
<td>
<?= $entity->getStatus() == DEFAULTS['STATUS'] ? anchor('cart/cancelCart/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) : "" ?>
<?= $entity->getStatus() == DEFAULTS['STATUS'] ? anchor('ecommerce/cancelCart/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) : "" ?>
</td>
</tr>
<?php $i++; ?>

View File

@ -1,4 +1,4 @@
<?= form_open("cart/addCart", ['method' => 'post']) ?>
<?= form_open("ecommerce/addCart", ['method' => 'post']) ?>
<?= form_hidden("product_uid", $entity->getPrimaryKey()) ?>
<input type="hidden" id="price" name="price" value="<?= ($entity->getPrice() - $entity->getSale()) * 1 ?>">
<?php