Hi,

I'm trying to write an observer, and it fails whenever I try to add an item to the cart. See below:

PHP Code:
<?php
class platinum extends base 
{
    var 
$freeProductID 75837;

    function 
platinum()
    {
        
$_SESSION['cart']->attach($this,array('NOTIFIER_CART_ADD_CART_END'));
    }
    
    function 
update(&$callingClass$notifier$paramsArray
    {
        global 
$db;
        
//die($_SESSION['customer_id']);
        
$statement "SELECT `customers_group_pricing` FROM `ch_customers` WHERE `customers_id` = ".(int)$_SESSION['customer_id'];
        
$check $db->Execute($statement);
        if(
$check->RecordCount() == 1)
            if (
$check->fields["customers_group_pricing"]==2)
            {
                
//$_SESSION['cart']->add_cart($this->freeProductID,1);
                
$_SESSION['cart']->add_cart("75837");            
            }
    }
}
?>