Okay, I fixed the error I found.
It's attaching to a class, so my understanding is that it does not have to use the stub notifier class.
It still does absolutely nothing. It does not even look like it's instantiating.
Here's the code:
in auto_loaders/overrides/config.vendorProducts.php
PHP Code:
<?php
$autoLoadConfig[90][] = array('autoType'=>'class',
'loadFile'=>'observers/class.vendorProducts.php');
$autoLoadConfig[90][] = array('autoType'=>'classInstantiate',
'className'=>'vendorProducts',
'objectName'=>'vendorProducts');
?>
in classes/observers/class.vendorProducts.php
PHP Code:
<?php
/*
* Observer code used to track vendor/artist product sale
*
*/
class vendorProducts extends base {
/** add date, product, and amt owed to vendor on product sale
*
*/
function vendorProducts() {
$this->attach('NOTIFY_ORDER_PROCESSING_CREDIT_ACCOUNT_UPDATE_BEGIN');
}
function update(&$class, $eventID) {
$_SESSION['vendorProducts'] = 1;
$amt_owed = 0;
$vendor_product_id = $db->Insert_ID();
$vendor_product_query = $db->Execute(" select manufacturers_id from " . TABLE_PRODUCTS . "
where products_id = '" . zen_get_prid($this->products[$i]['id'] . "'");
$vendor_order_query = $db->Execute(" select customers_id, date_purchased from " . TABLE_ORDERS . "
where orders_id = '" . $zf_insert_id "'");
$vendor_amt_owed += $this->products[$i]['price'] * VENDOR_CUT;
sql_vendor_product_query = array('vendor_product_id') => $vendor_product_id,
'manufacturers_id' => $vendor_product_query->fields['manufacturers_id'],
'purchasers_customer_id' => $vendor_order_query->fields['customers_id'],
'order_id' => $zf_insert_id;
'product_id' => $this->products[$i]['id'],
'order_date' => $vendor_order_query->fields['date_purchased'],
'product_price' => $this->products[$i]['price'],
'vendor_order_amt_owed' => $vendor_amt_owed);
zen_db_perform(TABLE_VENDOR_PRODUCTS, $sql_vendor_product_array);
} // end function update
}
?>
I'm missing something but I'm mystified as to what it is. Totally stumped. Help?
TIA
Arasii
Bookmarks