簡體   English   中英

單擊注冊塊中的提交按鈕后,magento重定向自定義cms頁

[英]magento redirect custom cms page after clicking submit button in register block

在單擊注冊塊(目錄)內的提交按鈕后,我想重定向頁面,如下所示。

frontend/base/default/template/customer/form/register.phtml

它當前鏈接到“ MY DASHBOARD”頁面,URL如domain.com/index.php/customer/account 我們如何將該頁面鏈接到其他自定義CMS頁面?

它在法師/法師/方塊/方塊里面嗎?


更新:它位於AccountController.php中,目錄如下

app->core->code->Mage->customer->controllers->AccountController.php

530行:

protected function _welcomeCustomer(Mage_Customer_Model_Customer $customer, $isJustConfirmed = false)
    {
        $this->_getSession()->addSuccess(
            $this->__('Thank you for registering with %s.', Mage::app()->getStore()->getFrontendName())
        );
        if ($this->_isVatValidationEnabled()) {
            // Show corresponding VAT message to customer
            $configAddressType =  $this->_getHelper('customer/address')->getTaxCalculationAddressType();
            $userPrompt = '';
            switch ($configAddressType) {
                case Mage_Customer_Model_Address_Abstract::TYPE_SHIPPING:
                    $userPrompt = $this->__('If you are a registered VAT customer, please click <a href="%s">here</a> to enter you shipping address for proper VAT calculation',
                        $this->_getUrl('customer/address/edit'));
                    break;
                default:
                    $userPrompt = $this->__('If you are a registered VAT customer, please click <a href="%s">here</a> to enter you billing address for proper VAT calculation',
                        $this->_getUrl('customer/address/edit'));
            }
            $this->_getSession()->addSuccess($userPrompt);
        }

        $customer->sendNewAccountEmail(
            $isJustConfirmed ? 'confirmed' : 'registered',
            '',
            Mage::app()->getStore()->getId()
        );

        $successUrl = $this->_getUrl('*/*/index', array('_secure' => true));
        if ($this->_getSession()->getBeforeAuthUrl()) {
            $successUrl = $this->_getSession()->getBeforeAuthUrl(true);
        }
        return $successUrl;
    }

我替換這條線

$successUrl = $this->_getUrl('*/*/index', array('_secure' => true));

有了這個

$successUrl = Mage::getBaseUrl()

然后頁面轉到我的主頁。

如果我想轉到url domain.com/coupon-spring2016又名我的自定義cms頁面怎么辦。 謝謝

您在這里有答案:

https://stackoverflow.com/a/25711352

您需要創建觀察者:

客戶注冊成功

並重定向到cms或您想要的位置

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM