I read through the WIKI and I thought I got the general idea... but all I get is a blank page! I'm trying to get a message header when someone adds an item(s) to their cart.
this is what I have in /includes/classes/observers/class.addProductMessage.php
Code:
<?php
/**
* Observer class used to add a free product to the cart if the user spends more than $x
*
*/
class addProductMessage extends base {
function addProductMessage() {
$_SESSION['cart']->attach($this, array('NOTIFIER_CART_ADD_CART_END');
}
function update(&$class, $eventID) {
$messageStack->add_session('header', 'test!', 'success');
}
}
?>
And this is what I have in /includes/auto_loaders/config.addProductMessage.php
Code:
<?php
$autoLoadConfig[85][] = array('autoType'=>'class',
'loadFile'=>'observers/class.addProductMessage.php');
$autoLoadConfig[85][] = array('autoType'=>'classInstantiate',
'className'=>'addProductMessage',
'objectName'=>'addProductMessage');
?>
From the examples given, I presumed this would work on the first shot because its so simple! What am I doing wrong???
- Steven
Bookmarks