List of Events (in the programming sense)

Hi all,

I am evaluating different shop software packages for my humble start into electronic sales. I grepped the source and searched the forums, but cannot come to a conclusion:

Are there “events” that I can programmatically observe?
If yes, is there a list of observable events somewhere in the documentation?

The reason I am asking: I plan for an additional database in the middle between webshop and “Warenwirtschaft”/ERP sytem, to make synchronization with Mule or Kettle easier, for some kind of a “MDM” with a “canonical data model” (just plain data models from Len Silverston’s books).
In the webshop I want to “hook” into the e.g. user registration process and call Stomp http://stomp.codehaus.org/

I prefer to “observe events” rather than trigger on a database level.

So again, my question is “Are there events that I can programmatically observe?”

Asks with best regards,
Chris

Hi,

well events as such there are not (in common sense), what you mean / look for are hooks.

So in your case you want to e.g. hook into the registration process.

This would be done with a module.

You are talking about a view register.php, which handles the registration process output and input using core classes (e.g. oxuser, oxadress, who in the end represent the oxid DB)

so to hook into the registration with an module you create a file like

my_register.php inside modules Folder, there you can hook into / extend the view like this:

<?php
class my_register extends my register__parent{
public function confirmRegistration(){
$result = parent::confirmRegistration();
$oUser = oxNew( ‘oxuser’ );
if ( $oUser->loadUserByUpdateId( $this->getUpdateId() ) ) {
//do what you want with the new active User, e.g. save info into your own DB
}
}
}

Also you could hook similarly into the oxuser::save() method, to make sure you have your User info in sync with your own DB …
?>

OK, thanks for the quick answer. I have not yet an exact list of all points in the program flow that I want to add functionality to.

I will evaluate if/how single class inheritance will suffice – my immediate thought was “obversable pattern” because of the “1:n” listening capabilities.
Might well be that I only have a “1:1”-need for “hooks”…

If not, hm, maybe I could throw in https://github.com/symfony/EventDispatcher into the OXID code at some central point… (I am under the impression that Piwik will need some tuning, too.)

So no, OXID has no events, but other possibilities. Thanks again for the quick answer.

What really surprises me is that in 2011 no software seems to exist that gives me an integrated way to deal with data. Only islands with point-to-point data-shoveling!