Pergunta

Many time user (guest or register) enter email id or pin code or any other detail in various custom modules generally used for promo or validation. I want to use same data to be reflect in checkout billing or shipping user information. Like save data in session then populate same in checkout form fields. If possible for register user these values reflect rather than previous values.

How to achieve this?

Foi útil?

Solução

To save information to the customer session:

$session = Mage::getSingleton('customer/session');
$session->setEmailId('somevalue');

To retrieve it later, use the getter:

$session = Mage::getSingleton('customer/session');
$session->getEmailId();

To display it in your template just echo the output of getEmailId, etc.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top