Hopefully you got my email.
But for others wondering about the same thing. I have to apologise.
The documentation is wrong.
You can use $this->attach to watch a notifier in the shopping cart class rather than $_SESSION['cart']->attach
The trick is to change the autoloader.
Documentation suggests using
PHP Code:
$autoLoadConfig[90][] = array('autoType'=>'class',
'loadFile'=>'observers/class.freeProduct.php');
$autoLoadConfig[90][] = array('autoType'=>'classInstantiate',
'className'=>'freeProduct',
however things will work if you use
PHP Code:
$autoLoadConfig[10][] = array('autoType'=>'class',
'loadFile'=>'observers/class.freeProduct.php');
$autoLoadConfig[90][] = array('autoType'=>'classInstantiate',
'className'=>'freeProduct',
Notice the load point for the class has been changed to 10.
HTH
Bookmarks