Your observer method can be written two ways. The method incorporated in ZC 1.5.3 and above uses camelcase to search for a function within the observer class appended to the word update. The method used since development of the notifier/observer classes has been to use the function update.
So for your observation of:
$this->notify('NOTIFY_ORDER_CART_AFTER_ADDRESSES_SET', '', $taxCountryId, $taxZoneId);
You could use:
Code:
<?php
class my_order_class extends base
{
function __construct() {
$this->attach($this, array('NOTIFY_ORDER_CART_AFTER_ADDRESSES_SET'));
}
function updateNotifyOrderCartAfterAddresses(&$callingClass, $notifier, $empty_string, &$taxCountryId, &$taxZoneId) {
// do action on data.
// to access variables of the calling class, then can use:
// $callingClass->billing, $callingClass->shipping, etc...
}
}
If want to use the update method alone, then need to determine or make clear about how the code will be used as a similar number of parameters will be needed in the update method, but if the code is used in ZC 1.5.1 or below and a default value is not applied, then an error is expected to occur because ZC 1.5.1 and below only pass information for the first three parameters.
The parameters, whatever variable name you want to use, relate to: 1) the class that made notification to be observed, 2) the notifier that was used to call the function, and the third 3) is an empty array if no data is provided. In this case an empty string is provided.
Further, the first variable is passed as mutable and the addition of & identifies that the data should be able to be modified and would be seen back in the calling class. The fourth through 11th parameters are also mutable by design. The second and third are immutable, even if an ampersand were added.