Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2011
    Location
    Espoo, Finland
    Posts
    46
    Plugin Contributions
    0

    Default [Done v157a] Parameter $zf_order_id is not being transferred to after_order_create

    Hello,

    Sorry, if my question is stupid - I'm not a pro and supporting my onw web-shop only, but...

    Is this code (appeared in V157 in includes/classes/payment.php) really correct:

    Code:
      function after_order_create($zf_order_id) {
        if (!is_array($this->modules)) return;
        if (!is_object($GLOBALS[$this->selected_module])) return;
        if (!$GLOBALS[$this->selected_module]->enabled) return;
        $function = __FUNCTION__;
        if (!method_exists($GLOBALS[$this->selected_module], $function)) return;
        return $GLOBALS[$this->selected_module]->after_order_create($function);
      }
    I've got an issue using this method in one of my own payment modules - it seems the parameter ($zf_order_id) is not being transferred corrctly into the method

    (also the same for admin_notification method of the same class, but I do not know, if it is actually in use somewhere)
    Last edited by yesaul; 20 Jul 2020 at 10:22 AM.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: parameter $zf_order_id is not being transferred into the after_order_create metho

    This is slightly incorrect. The last line should use $zf_order_id instead of $function.

    Preparing a PR for these two occurrences.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: parameter $zf_order_id is not being transferred into the after_order_create metho

    Quote Originally Posted by mc12345678 View Post
    This is slightly incorrect. The last line should use $zf_order_id instead of $function.

    Preparing a PR for these two occurrences.
    PR: https://github.com/zencart/zencart/pull/3769
    File changes: https://github.com/zencart/zencart/pull/3769/files
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: parameter $zf_order_id is not being transferred into the after_order_create metho

    @yesaul - would you please make a note of the symptoms you saw that led you to investigate this? (This will help less experienced people find this post and @mc's fix).

    Thanks guys.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Apr 2011
    Location
    Espoo, Finland
    Posts
    46
    Plugin Contributions
    0

    Default Re: parameter $zf_order_id is not being transferred into the after_order_create metho

    Quote Originally Posted by swguy View Post
    @yesaul - would you please make a note of the symptoms you saw that led you to investigate this? (This will help less experienced people find this post and @mc's fix)
    I'm not sure, if my experience in this case can be helpful for somebody, but anyway:

    I use my own module for card payments, where after_order_create method is being used to associate the payment transaction with order number assigned by Zen-Cart (in special transaction log table)

    After upgrade to v.157 I have started getting log records with no order number

    This have been the only problem

    There were no PHP warnings, nor errors, etc appeared

 

 

Similar Threads

  1. [Done v157a] Product Master Category Bug
    By Footie1 in forum Bug Reports
    Replies: 7
    Last Post: 26 Oct 2020, 10:49 AM
  2. Replies: 12
    Last Post: 5 Oct 2020, 11:11 PM
  3. [Duplicate] [Done v157a] Define Page Editor
    By niccol in forum Bug Reports
    Replies: 2
    Last Post: 5 Oct 2020, 04:42 PM
  4. Replies: 3
    Last Post: 9 Sep 2020, 05:39 PM
  5. Replies: 7
    Last Post: 27 Jul 2020, 11:57 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