Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

顧客検索と受注検索のPerPageをSESSIONに保存(商品検索と同じ対応) #2365

Merged
merged 1 commit into from
Jun 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/Eccube/Controller/Admin/Customer/CustomerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,22 @@ public function index(Application $app, Request $request, $page_no = null)
$active = false;

$pageMaxis = $app['eccube.repository.master.page_max']->findAll();
$page_count = $app['config']['default_page_count'];

// 表示件数は順番で取得する、1.SESSION 2.設定ファイル
$page_count = $session->get('eccube.admin.customer.search.page_count', $app['config']['default_page_count']);

$page_count_param = $request->get('page_count');
// 表示件数はURLパラメターから取得する
if($page_count_param && is_numeric($page_count_param)){
foreach($pageMaxis as $pageMax){
if($page_count_param == $pageMax->getName()){
$page_count = $pageMax->getName();
// 表示件数入力値正し場合はSESSIONに保存する
$session->set('eccube.admin.customer.search.page_count', $page_count);
break;
}
}
}

if ('POST' === $request->getMethod()) {

Expand Down Expand Up @@ -95,6 +110,7 @@ public function index(Application $app, Request $request, $page_no = null)
// sessionを削除
$session->remove('eccube.admin.customer.search');
$session->remove('eccube.admin.customer.search.page_no');
$session->remove('eccube.admin.customer.search.page_count');
} else {
// pagingなどの処理
if (is_null($page_no)) {
Expand Down
19 changes: 18 additions & 1 deletion src/Eccube/Controller/Admin/Order/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,23 @@ public function index(Application $app, Request $request, $page_no = null)

$disps = $app['eccube.repository.master.disp']->findAll();
$pageMaxis = $app['eccube.repository.master.page_max']->findAll();
$page_count = $app['config']['default_page_count'];

// 表示件数は順番で取得する、1.SESSION 2.設定ファイル
$page_count = $session->get('eccube.admin.order.search.page_count', $app['config']['default_page_count']);

$page_count_param = $request->get('page_count');
// 表示件数はURLパラメターから取得する
if($page_count_param && is_numeric($page_count_param)){
foreach($pageMaxis as $pageMax){
if($page_count_param == $pageMax->getName()){
$page_count = $pageMax->getName();
// 表示件数入力値正し場合はSESSIONに保存する
$session->set('eccube.admin.order.search.page_count', $page_count);
break;
}
}
}

$active = false;

if ('POST' === $request->getMethod()) {
Expand Down Expand Up @@ -93,6 +109,7 @@ public function index(Application $app, Request $request, $page_no = null)
// sessionを削除
$session->remove('eccube.admin.order.search');
$session->remove('eccube.admin.order.search.page_no');
$session->remove('eccube.admin.order.search.page_count');
} else {
// pagingなどの処理
$searchData = $session->get('eccube.admin.order.search');
Expand Down