Я предполагаю, что этот код работает до того, как данные объекта клиента были сохранены.
Существует строка коды callled: в OnePageCheckout и выполняет следующие действия:
/**
* Involve new customer to system
*
* @return Mage_Checkout_Model_Type_Onepage
*/
protected function _involveNewCustomer()
{
$customer = $this->getQuote()->getCustomer();
if ($customer->isConfirmationRequired()) {
$customer->sendNewAccountEmail('confirmation', '', $this->getQuote()->getStoreId());
$url = Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail());
$this->getCustomerSession()->addSuccess(
Mage::helper('customer')->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please <a href="%s">click here</a>.', $url)
);
} else {
$customer->sendNewAccountEmail('registered', '', $this->getQuote()->getStoreId());
$this->getCustomerSession()->loginById($customer->getId());
}
return $this;
}
Если клиент просто регистрируется, а не с помощью процесса проверки, то есть другая функция с помощью запроса параметры, такие как Антон сказал:
/app/code/core/Mage/Customer/Block/Form/Register.php
/**
* Restore entity data from session
* Entity and form code must be defined for the form
*
* @param Mage_Customer_Model_Form $form
* @return Mage_Customer_Block_Form_Register
*/
public function restoreSessionData(Mage_Customer_Model_Form $form, $scope = null)
{
if ($this->getFormData()->getCustomerData()) {
$request = $form->prepareRequest($this->getFormData()->getData());
$data = $form->extractData($request, $scope, false);
$form->restoreData($data);
}
return $this;
}
вы можете быть более конкретным? Благодаря! – Bobo
получить его от $ _POST (и использовать эквивалентный синтаксис, который magento реализует для этого) напрямую? –