Skip to content

Commit

Permalink
feat SiteMap: ページあたりの商品数の設定を eccube.yaml に移動しました
Browse files Browse the repository at this point in the history
  • Loading branch information
okazy committed Apr 22, 2021
1 parent 54a0b9f commit 257e99a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/config/eccube/packages/eccube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ parameters:
plugin_temp_realdir: /PATH/TO/WEB_ROOT/src/Eccube/Repository/Master/upload/temp_plugin/ # upload_tmp_dir に任せればよい?
eccube_price_len: 8 # 最大値で制御したい
eccube_search_pmax: 12
eccube_sitemap_products_per_page: 1000
eccube_stext_len: 255
eccube_sltext_len: 500
eccube_smtext_len: 100
Expand Down
9 changes: 2 additions & 7 deletions src/Eccube/Controller/SitemapController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ class SitemapController extends AbstractController
*/
private $router;

/**
* @var int
*/
private $item_per_page = 1000;

/**
* SitemapController constructor.
*/
Expand Down Expand Up @@ -101,7 +96,7 @@ public function index(Paginator $paginator)
$pagination = $paginator->paginate(
$productQueryBuilder,
1,
$this->item_per_page
$this->eccubeConfig['eccube_sitemap_products_per_page']
);
$paginationData = $pagination->getPaginationData();

Expand Down Expand Up @@ -148,7 +143,7 @@ public function product(Request $request, Paginator $paginator)
$pagination = $paginator->paginate(
$productQueryBuilder,
$request->get('page'),
$this->item_per_page
$this->eccubeConfig['eccube_sitemap_products_per_page']
);
$paginationData = $pagination->getPaginationData();

Expand Down

0 comments on commit 257e99a

Please sign in to comment.