php - How to invoke $customer->save() on a given event -


so i've been tasked creating module login/register customer in magento based on existing authentication data system. thought create widget can placed admin links. part i've figured out how do.

the next part may need assistance. i've read enough articles understand how create custom url structure in order fire module's actions, assume can link directly action, invoke login or registration request , send user referral page (or profile page, haven't spec'd project details tbd).

here's need help. i've found methods capture post request login , registration pages -- should extend mage_customer_accountcontroller class , create required methods loosely similar calls used in loginpostaction() , createpostaction() methods?

for reference, started initial project dev on fresh install of newly-released 1.5.0.0 file i'm referring

/magento/app/code/core/mage/customer/controllers/accountcontroller.php

all event-based behavior in magento should handled within event/observer methods (more information can found here).... instance call own actions on customer login subscribe customer_login or customer_logout events. if trying subscribe event on customer save in admin area adminhtml_customer_save_after event. full list of these 1.4.2 can found here.

another word of caution - overloading controllers sparingly. of you're trying can accomplished making own controllers , using zend forward() method forward desired controller method (you mentioned loginpostaction() in mage_customer_accountcontroller) after getting functionality in ahead of time.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -