Magento: Forgotten Pword возвращает пустую страницу браузера - PullRequest
3 голосов
/ 01 декабря 2011

Я действительно надеюсь, что кто-то здесь может помочь с этим.

Я использую новую версию Magento 1.6.1.0

Если клиент щелкает ссылку забытого пароля на веб-интерфейсе, ему отправляется электронное письмо со ссылкой для нажатия. Когда они нажимают на ссылку в электронном письме, в браузере отображается пустая белая страница (нет запроса на сброс pword). Путь при запуске ссылки на электронную почту выглядит следующим образом:

    www.mystore.com/customer/account/resetpassword/?id=4 token=26f8abcc1efd5559ce81ced2706586db

The "error_log" said:
30-Nov-2011 07:42:50] PHP Fatal error: Call to a member function setCustomerId() on a non-object in /home3/bestcara/public_html/app/code/core/Mage/Customer/controllers/AccountContr‌​oller.php on line 587

и вот блок кода из AccountController.php

     * Display reset forgotten password form
 *
 * User is redirected on this action when he clicks on the corresponding link in password reset confirmation email
 *
 */
public function resetPasswordAction()
{
    $resetPasswordLinkToken = (string) $this->getRequest()->getQuery('token');
    $customerId = (int) $this->getRequest()->getQuery('id');
    try {
        $this->_validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken);
        $this->loadLayout();
        // Pass received parameters to the reset forgotten password form
        $this->getLayout()->getBlock('resetPassword')
            ->setCustomerId($customerId),<------------------------------------Line 587
            ->setResetPasswordLinkToken($resetPasswordLinkToken);
        $this->renderLayout();
    } catch (Exception $exception) {
        $this->_getSession()->addError(Mage::helper('customer')->__('Your password reset link has expired.'));
        $this->_redirect('*/*/');
    }
}

Мне действительно нужно исправить это как можно скорее. Любая помощь очень ценится!

Ответы [ 2 ]

7 голосов
/ 01 декабря 2011

Похоже, моя тема не поддерживалась для Magento 1.6.1.0

перейти к: приложение / дизайн / интерфейс / по умолчанию / [your_custom_theme_folder] /layout/customer.xml

добавить эти коды:

<customer_account_resetpassword translate="label">
    <label>Reset a Password</label>
    <remove name="right"/>
    <remove name="left"/>

    <reference name="head">
        <action method="setTitle" translate="title" module="customer">
            <title>Reset a Password</title>
        </action>
    </reference>
    <reference name="root">
        <action method="setTemplate">
            <template>page/1column.phtml</template>
        </action>
        <action method="setHeaderTitle" translate="title" module="customer">
            <title>Reset a Password</title>
        </action>
    </reference>
    <reference name="content">
        <block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
    </reference>
</customer_account_resetpassword>

Работает как шарм!

0 голосов
/ 16 марта 2015

Проверьте ваш customer.xml.

см. Ответ по этой ссылке http://buyolx.blogspot.in/2015/03/magento-forgot-password-and-reset.html


Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...