Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 35
  1. #11
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Orders Status History -- Updated By [Support Thread]

    can the code for updating the table for who updated the order just be included in orders.php?

  2. #12
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Orders Status History -- Updated By [Support Thread]

    The section below is from my orders.php, i've managed to merge all other tracking mods into your osh_updated_by_functions.php file, but I can't figure this but out.

    What do I need to do in this section?

    PHP Code:
    $email_comments = (zen_not_null($message) && $email_include_message === true) ? (OSH_EMAIL_TEXT_COMMENTS_UPDATE $message "\n\n") : ''
    PHP Code:
                $notify_comments '';
    // BEGIN TY TRACKER 3 - E-MAIL TRACKING INFORMATION  ----------------------------------
                
    if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on')) {
                  if (
    zen_not_null($comments)) { $notify_comments EMAIL_TEXT_COMMENTS_UPDATE $comments "\n\n"; }
                  if (
    zen_not_null($track_id1)) { $notify_comments .= "\n\nYour " CARRIER_NAME_1 " Tracking ID is " $track_id1 " \n<br /><a href=" CARRIER_LINK_1 $track_id1 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_1 $track_id1 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }
                  if (
    zen_not_null($track_id2)) { $notify_comments .= "\n\nYour " CARRIER_NAME_2 " Tracking ID is " $track_id2 " \n<br /><a href=" CARRIER_LINK_2 $track_id2 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_2 $track_id2 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }
                  if (
    zen_not_null($track_id3)) { $notify_comments .= "\n\nYour " CARRIER_NAME_3 " Tracking ID is " $track_id3 " \n<br /><a href=" CARRIER_LINK_3 $track_id3 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_3 $track_id3 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }
                  if (
    zen_not_null($track_id4)) { $notify_comments .= "\n\nYour " CARRIER_NAME_4 " Tracking ID is " $track_id4 " \n<br /><a href=" CARRIER_LINK_4 $track_id4 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_4 $track_id4 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }
                  if (
    zen_not_null($track_id5)) { $notify_comments .= "\n\nYour " CARRIER_NAME_5 " Tracking ID is " $track_id5 " \n<br /><a href=" CARRIER_LINK_5 $track_id5 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_5 $track_id5 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }
                  if (
    zen_not_null($track_id6)) { $notify_comments .= "\n\nYour " CARRIER_NAME_6 " Tracking ID is " $track_id6 " \n<br /><a href=" CARRIER_LINK_6 $track_id6 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_6 $track_id6 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }

    // BEGIN TY TRACKER 3 - E-MAIL TRACKING INFORMATION --------------------------------------------------------------------
                
    }
                
    //send emails
                
    $message 

  3. #13
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: Orders Status History -- Updated By [Support Thread]

    Quote Originally Posted by DigitalShadow View Post
    can the code for updating the table for who updated the order just be included in orders.php?
    You can certainly pull the $updated_by determination from /includes/functions/extra_functions/osh_updated_by_functions.php and include that in your customized version of orders.php.

    You'll need also to copy the zen_updated_by_admin function and the code that adds the updated_by field to the database (if not already present).

    Please note: The notifiers issued by the zen_update_orders_history common function are used by a fair number of my other plugins to recognize that an order's status information is being updated and, if so, what has changed.

  4. #14
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: Orders Status History -- Updated By [Support Thread]

    Quote Originally Posted by DigitalShadow View Post
    The section below is from my orders.php, i've managed to merge all other tracking mods into your osh_updated_by_functions.php file, but I can't figure this but out.

    What do I need to do in this section?

    PHP Code:
    $email_comments = (zen_not_null($message) && $email_include_message === true) ? (OSH_EMAIL_TEXT_COMMENTS_UPDATE $message "\n\n") : ''
    PHP Code:
                $notify_comments '';
    // BEGIN TY TRACKER 3 - E-MAIL TRACKING INFORMATION  ----------------------------------
                
    if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on')) {
                  if (
    zen_not_null($comments)) { $notify_comments EMAIL_TEXT_COMMENTS_UPDATE $comments "\n\n"; }
                  if (
    zen_not_null($track_id1)) { $notify_comments .= "\n\nYour " CARRIER_NAME_1 " Tracking ID is " $track_id1 " \n<br /><a href=" CARRIER_LINK_1 $track_id1 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_1 $track_id1 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }
                  if (
    zen_not_null($track_id2)) { $notify_comments .= "\n\nYour " CARRIER_NAME_2 " Tracking ID is " $track_id2 " \n<br /><a href=" CARRIER_LINK_2 $track_id2 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_2 $track_id2 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }
                  if (
    zen_not_null($track_id3)) { $notify_comments .= "\n\nYour " CARRIER_NAME_3 " Tracking ID is " $track_id3 " \n<br /><a href=" CARRIER_LINK_3 $track_id3 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_3 $track_id3 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }
                  if (
    zen_not_null($track_id4)) { $notify_comments .= "\n\nYour " CARRIER_NAME_4 " Tracking ID is " $track_id4 " \n<br /><a href=" CARRIER_LINK_4 $track_id4 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_4 $track_id4 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }
                  if (
    zen_not_null($track_id5)) { $notify_comments .= "\n\nYour " CARRIER_NAME_5 " Tracking ID is " $track_id5 " \n<br /><a href=" CARRIER_LINK_5 $track_id5 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_5 $track_id5 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }
                  if (
    zen_not_null($track_id6)) { $notify_comments .= "\n\nYour " CARRIER_NAME_6 " Tracking ID is " $track_id6 " \n<br /><a href=" CARRIER_LINK_6 $track_id6 ">Click here</a> to track your package. \n<br />If the above link does not work, copy the following URL address and paste it into your Web browser. \n<br />" CARRIER_LINK_6 $track_id6 "\n\n<br /><br />It may take up to 24 hours for the tracking information to appear on the website." "\n<br />"; }

    // BEGIN TY TRACKER 3 - E-MAIL TRACKING INFORMATION --------------------------------------------------------------------
                
    }
                
    //send emails
                
    $message 
    Oh, let me hunt that up. I created an OSH/orders.php merge that includes Ty Package Tracker support a while ago ...

    Ahh, there it is: typt_v131_snap_v251.zip

    Don't be put off by the zip-file's name, SNAP Affiliates is one of the plugins that depends (heavily) on the notifiers issued by the OSH common function.
    Last edited by lat9; 24 Jan 2015 at 03:46 PM. Reason: Added link to merged code.

  5. #15
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Orders Status History -- Updated By [Support Thread]

    Ok, the tracking info now sends via email, and everything seems to work in that regard, but for some strange reason, it is still not updating the updated by field

  6. #16
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: Orders Status History -- Updated By [Support Thread]

    Quote Originally Posted by DigitalShadow View Post
    Ok, the tracking info now sends via email, and everything seems to work in that regard, but for some strange reason, it is still not updating the updated by field
    When the updated-by field is not being updated, what is being updated? Is only the TyPT info being added or is that addition accompanied by an orders-status value change as well?

  7. #17
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Orders Status History -- Updated By [Support Thread]

    everything is being updated, comments, tracking, status, if the customer should be sent and email or not, the only thing not being updated is updated_by

  8. #18
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: Orders Status History -- Updated By [Support Thread]

    Any debug-logs being generated?

  9. #19
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Orders Status History -- Updated By [Support Thread]

    nope, is there anything i can echo in order.php to check the status of the functions?

    If i change the status of the order without entering a comment or tracking info, a new record is being generated in TABLE_ORDER_STATUS_HISTORY

    but nothing is being inserted into updated_by
    Last edited by DigitalShadow; 24 Jan 2015 at 05:24 PM.

  10. #20
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: Orders Status History -- Updated By [Support Thread]

    Look in /includes/functions/extra_functions/osh_updated_by_functions.php to find the following fragment, adding the line in red:
    Code:
    error_log (print_r (IS_ADMIN_FLAG, true) . ', ' . print_r ($updated_by, true));        
            if (!zen_not_null($updated_by)) {
              if (IS_ADMIN_FLAG === true && isset($_SESSION['admin_id'])) {
                $updated_by = zen_updated_by_admin();
                
              } elseif (IS_ADMIN_FLAG === false && isset($_SESSION['customers_id'])) {
                $updated_by = '';
                
              } else {
                $updated_by = 'N/A';
                
              }
            }
    That will create a debug-log file that contains the value of the IS_ADMIN_FLAG (which should be true) and the $updated_by value (which should be null).

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v150 Reviews - Updated [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 125
    Last Post: 30 Apr 2023, 07:59 PM
  2. Set Language Status [Support Thread]
    By Design75 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 5 May 2016, 06:25 PM
  3. Replies: 68
    Last Post: 29 Jul 2013, 06:33 PM
  4. Orders status history - error message
    By dmagic in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 17 Mar 2011, 12:11 PM
  5. Updated status but invoice status not updated
    By bax79 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 6 May 2009, 03:53 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