I like to redirect the page after clicking the submit button inside register block, directory as follow.
frontend/base/default/template/customer/form/register.phtml
It is currently linked to "MY DASHBOARD" page, url such as domain.com/index.php/customer/account
. How do we link this page to some other custom CMS page?
Is it somewhere inside Mage/Cutomer/Block?
updates: It is inside AccountController.php, directory as follow
app->core->code->Mage->customer->controllers->AccountController.php
line 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;
}
I replace this line
$successUrl = $this->_getUrl('*/*/index', array('_secure' => true));
with this
$successUrl = Mage::getBaseUrl()
and the page goes to my homepage.
What if I like to go to url domain.com/coupon-spring2016
aka my custom cms page. Thank you