Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: $messageStack->add(...) in observer won't work

    mc12345678,
    Some further clarification please...

    The notes in includes/init_includes/init_observers.php refer to the naming convention of the class in includes/classes/observers/auto.xxxx.php as "zcObserver" + the camelcased xxxx string, and in includes/classes/class_base.php notes, the naming convention of the class method is "update" + camelcased xxxx string or just update. But I could also use the zc version below 1.5.3 method of freely naming the class zzzz in class file class.yyyy in includes/classes/observers with the method name of update, as long as the config.yyyy is present in includes/auto_loaders and it defines the class name as zzzz. Do I have this all correct?

    Also, if two or more observers are triggered by the same notifier, in what order are the observers executed? DrByte said in a post referring to zc 1.5.1 that the order of instantiation was the order of execution. Is that still true for zc 1.5.5 and what is the order of instantiation? Unfortunately, I could not determine the order of instantiation from a quick look at class_base.php.

    Thanks again for your help!

  2. #12
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: $messageStack->add(...) in observer won't work

    Just wanted to correct the above post (correction in red)...

    The notes in includes/init_includes/init_observers.php refer to the naming convention of the class in includes/classes/observers/auto.xxxx.php as "zcObserver" + the camelcased xxxx string, and in includes/classes/class_base.php notes, the naming convention of the class method is "update" + camelcased notifier string or just update. But I could also use the zc version below 1.5.3 method of freely naming the class zzzz in class file class.yyyy in includes/classes/observers with the method name of update, as long as the config.yyyy is present in includes/auto_loaders and it defines the class name as zzzz. Do I have this all correct?

  3. #13
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: $messageStack->add(...) in observer won't work

    Quote Originally Posted by Dave224 View Post
    Just wanted to correct the above post (correction in red)...

    The notes in includes/init_includes/init_observers.php refer to the naming convention of the class in includes/classes/observers/auto.xxxx.php as "zcObserver" + the camelcased xxxx string, and in includes/classes/class_base.php notes, the naming convention of the class method is "update" + camelcased notifier string or just update. But I could also use the zc version below 1.5.3 method of freely naming the class zzzz in class file class.yyyy in includes/classes/observers with the method name of update, as long as the config.yyyy is present in includes/auto_loaders and it defines the class name as zzzz. Do I have this all correct?
    To go slightly a step further and to be sure that x, y, z and the new w match up see the blue text edits below:

    The notes in includes/init_includes/init_observers.php refer to the naming convention of the class in includes/classes/observers/auto.xxxx.php as "zcObserver" + the camelcased xxxx string, and in includes/classes/class_base.php notes, the naming convention of the class method is "update" + camelcased notifier string or just update (when more than one notifier is present then it may be necessary to detect which notifier is present to take only the specific action for the specific notifier). But I could also use the zc version below 1.5.3 method of freely naming the class zzzz in class file class.yyyy in includes/classes/observers with the method name of update (note that any other functions in this file pre-1.5.3 can be called from the standard update method), as long as the config.wwww.php file is present in includes/auto_loaders, identifies the stored location of the class as being in the observers directory and it defines the class name as zzzz. Do I have this all correct?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. How do I add a coupon alert via messageStack for COWAO?
    By Dan123 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 9 Jul 2011, 01:05 AM
  2. uri mapping won't work on add to cart botton? help..
    By bryanblue in forum All Other Contributions/Addons
    Replies: 14
    Last Post: 25 Jan 2011, 03:27 AM
  3. $messageStack->add('gv_send'...
    By creative_mind in forum General Questions
    Replies: 4
    Last Post: 5 May 2010, 07:11 AM
  4. contact us won't work
    By mex in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Mar 2007, 11:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR