I need to add new customer field. This field should be available during customer registration via OPC.
How I can do it?
I can rewrite Mage_Checkout_Model_Type_Onepage
modify method saveBilling
and add into it:
$this->getCheckout()->setSomeField($data['some_field']);
After it I can call Observer on event checkout_type_onepage_save_order
and use such code:
$quote = $observer->getEvent()->getQuote();
$customer = $quote->getCustomer();
$customer->setSomeField(Mage::getSingleton('checkout/session')->getSomeField());
And this field will be added to customer.
But I already have 2 time rewrites for class Mage_Checkout_Model_Type_Onepage
. And this one will be third. I don't like. Maybe I can use some event for it? Or any other approach?