문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top