バージョン選択

フォーラム

メニュー

オンライン状況

56 人のユーザが現在オンラインです。 (48 人のユーザが フォーラム を参照しています。)
登録ユーザ: 1
ゲスト: 55
thegioiye もっと...

サイト内検索

質問 > フロント機能 > トップページに商品一覧を出したい

フロント機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
nic
投稿日時: 2019/2/7 19:49
対応状況: −−−
半人前
登録日: 2017/4/17
居住地:
投稿: 17
Re: トップページに商品一覧を出したい
御教授ありがとうございます。
デバックモードで確認したところ、以下のような表示が出ました。

An exception has been thrown during the rendering of a template ("The autoloader expected class "Eccube\Controller\Block\Item_ListController" to be defined in file "/home/XXX/●●.com/public_html/shop/vendor/composer/../../src/Eccube/Controller/Block/Item_ListController.php". The file was found but the class was not in it, the class name or namespace probably has a typo.").


おそらく、「ファイルとの紐づけはされてるけど、クラスがない。クラス名や名前空間が間違ってない?」とのこと。

プロバイダ「FrontControllerProvider.php」で
$c->match('/block/item_list', '\Eccube\Controller\Block\Item_ListController::index')->bind('block_item_list');

指摘された「Item_ListController.php」では、「ProductController.php」に習って
ファイル冒頭の名前空間とクラス名を以下のようにしています。
----------------------------------------------------
namespace Eccube\Controller;

use Eccube\Application;
use Eccube\Common\Constant;
use Eccube\Event\EccubeEvents;
use Eccube\Event\EventArgs;
use Eccube\Exception\CartException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

class Item_ListController
{
private $title;
public function __construct()
{
$this->title = '';
}
public function index(Application $app, Request $request)
{
----------------------------------------------------

クラス名や名前空間はあってるとは思うのですが?
プロバイダ「FrontControllerProvider.php」部分で何か間違いでもあるのでしょうか?


フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   トップページに商品一覧を出したい nic 2019/2/6 0:06
     Re: トップページに商品一覧を出したい 468 2019/2/6 13:40
     » Re: トップページに商品一覧を出したい nic 2019/2/7 19:49
         Re: トップページに商品一覧を出したい 468 2019/2/7 21:18
           Re: トップページに商品一覧を出したい nic 2019/2/8 14:13

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,708名です
総投稿数は109,948件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1638
8
red
1570
9
mcontact
1285
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.