I'm making available to the user the option for him to edit his personal information during checkout, when he is logged in. How could I do this? which class should i extend ?
1 Answer
Could you specify "personal information". Do you mean like an address or name or are you having custom customer attributes? These are different classes but they will most likely all be under Mage_Core_Customer_Model_...something.
You can call $customer = Mage::registry('current_customer') or Mage::registry('customer')
which will give you the customer class. From that point you can fetch and manipulate most customer related information. Note that this is also possible when you are "not logged in". A guest order is not logged in but has customer information.
If you're in a checkout context you could also try Mage::registry('order')
and then $order->getCustomer()
. It's been a while since I developed in Magento so I don't know it out of the top of my head anymore but if you tell me what kind if info you want to manipulate I can give some better example.
The way to manipulate is most likely using an observer
or a class rewrite
.These are your google search terms to find out how to do this but you can also add some info to your post and I might be able to give you an example.