Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Changing the same customer attribute in various modules? 
 
teknoid
Jr. Member
 
Total Posts:  8
Joined:  2012-07-06
 

In my heavily customized magento implementation we have a number of custom modules.
I also have a couple of observers in various modules that need to modify a certain customer attribute.

Ideally i’d like to abstract the method which handles attribute manipulation into a single point. I’m wondering what would be the best practice for doing so.

Should I create a helper method or is it better abstracted in the customer model?

The goal is to be able to call something like[ Mage::getSingleton(’mymodule/customer’)/Mage::helper(’mymodule/customer’)]->changeAttrib($params); ... of course i’d like to be able to call that from any part (mostly observers) of my app. What is the best or recommended approach?

thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Siggi_Schmitz
Enthusiast
 
Avatar
Total Posts:  811
Joined:  2011-07-03
 

Hmmm, i would simple create a helper class for this methods.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top