Skip to content

Commit

Permalink
Small updates to notifier docs
Browse files Browse the repository at this point in the history
  • Loading branch information
scottcwilson committed Feb 21, 2021
1 parent 0b059fc commit 7b80c08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion content/dev/code/inclusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See [Extra folders](/dev/code/extra_folders/) for a complete list.

### Auto Loaded Observers

These are described in the [Notifiers and Observers](/dev/code/notifiers/#auto-loaded-observers) documentation. Auto-loaded Observer files include those in `includes/classes/observers` (and Admin) whose name begins with `auto` and which define a class named **zcObserver** + the [CamelCased](http://en.wikipedia.org/wiki/CamelCase) filename.
These are described in the [Notifiers and Observers](/dev/code/notifiers/#auto-loaded-observers) documentation. Auto-loaded Observer files include those in `includes/classes/observers` (and Admin) whose name begins with `auto.` and which define a class named **zcObserver** + the [CamelCased](http://en.wikipedia.org/wiki/CamelCase) filename - for example, `class zcObserverFooObserver`.

### Stylesheets

Expand Down
2 changes: 2 additions & 0 deletions content/dev/code/notifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ Note that this technique will work so long as your class doesn't have any specia

For example, the *Products Viewed Counter* described [above](#update) could provide the same functionality and not need its auto-loader component if the observer-class file was renamed to `/includes/classes/observers/auto.products_viewed_counter.php` and its class name was updated to be `zcObserverProductsViewedCounter.php`.

**Note:** The text above describes the behavior of auto loading on the storefront side. Support for auto-loading on the admin side was added in Zen Cart 1.5.7.

### Event-Specific Update Methods

Problem: If in one Observer class you attach to a number of different events, a single `update` function will fire for all of those events ... but that means it will likely be receiving different function parameters depending on which event was triggered.
Expand Down

0 comments on commit 7b80c08

Please sign in to comment.