0

「192」など、独自の ID を持つカテゴリを除いて、すべてのカテゴリのログインを作成する必要があります。

controller/category.php に以下を追加しました...

if (!$this->customer->isLogged()) {
    $this->session->data['redirect'] = $this->url->link('account/account', '', 'SSL');
    $this->redirect($this->url->link('account/login', '', 'SSL'));
}

しかし、これは明らかにすべてのカテゴリのログインを追加します.

上記のコードに追加して、カテゴリ「192」を表示するためにログインする必要がないようにする最良の方法は何ですか?

4

1 に答える 1

0

上記のコードを開いcatalog/controller/product/category.phpて、どこからでも削除します。次に、見つけます

if ($category_info) {

その後、

if (!$this->customer->isLogged() && $category_id != 192) {
    $this->session->data['redirect'] = $this->url->link('account/account', '', 'SSL');
    $this->redirect($this->url->link('account/login', '', 'SSL'));
}
于 2013-03-26T19:35:17.430 に答える