Totally Zenned
- Join Date:
- Jun 2005
- Location:
- Kelowna, BC Canada
- Posts:
- 1,033
- Plugin Contributions:
- 4
Stumped on notifiers, help?
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
<?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```
<?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