1

リンクをクリックした後、ログインしていない顧客をリダイレクトする機能に取り組んでいます。複数のアドレスを設定します。ベンダーのファイルをファイル ディレクトリで変更しようとしまし/vendor/magento/module-multishipping/Controller/Checkoutたが、リンクを再度クリックすると、404 のエラーが表示されます。変更したいコード

<?php
/**
 *
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\Multishipping\Controller\Checkout;

class Login extends \Magento\Multishipping\Controller\Checkout
{
    /**
     * Multishipping checkout login page
     *
     * @return void
     */
    public function execute()
    {
        if ($this->_objectManager->get(\Magento\Customer\Model\Session::class)->isLoggedIn()) {
            $this->_redirect('*/*/');
            return;
        }

        $this->_view->loadLayout();

        // set account create url
        $loginForm = $this->_view->getLayout()->getBlock('customer.new');
        if ($loginForm) {
            $loginForm->setCreateAccountUrl($this->_getHelper()->getMSRegisterUrl());
        }
        $this->_view->renderLayout();
    }
}

このファイルを変更して、ユーザーがログインせずにアドレス ページにリダイレクトされるようにするにはどうすればよいですか?

4

0 に答える 0