Hey,
I'm trying to make an observer that checks a condition, and adds a product to the cart if the condition is true. However, I can't even get the skeleton of the concept to work. I put my config.classname.php in auto-loaders and the class.classname.php in includers/classes/observers The best I get is it puking the source of the class above the page, at one point the page wouldnt load.
Here is the code:
config
PHP Code:
<?php
$autoLoadConfig[90][] = array('autoType'=>'class',
'loadFile'=>'observers/class.platinum.php');
$autoLoadConfig[90][] = array('autoType'=>'classInstantiate',
'className'=>'platinum',
'objectName'=>'platinum');
?>
And the class...
PHP Code:
class platinum extends base
{
function myplatinum()
{
$this->attach($this,array('NOTIFIER_CART_ADD_CART_END'));
}
function update(&$callingClass, $notifier, $paramsArray)
{
echo "BIG OBNOXIOUS LETTERS<br><br><br><hr>";
}
}
Bookmarks