Page 12 of 13 FirstFirst ... 210111213 LastLast
Results 111 to 120 of 126
  1. #111
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Admin Notes Advanced

    OK, thanks. I will do some testing to see if I can figure it out.

    Zen Cart and it's community are the best!!

  2. #112
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Admin Notes Advanced

    Nope, guess I'm too rusty with PHP and can't figure it out. Will live with the notices for now

    Zen Cart and it's community are the best!!

  3. #113
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Admin Notes Advanced

    I haven't looked at the complete code, but I think you can use something like:
    PHP Code:
    if(isset($_GET['cID']) && ($_GET['cID'] == $notes_active->customers_id) && !isset($_GET['gID']) ||(($notes_customer_result->RecordCount() > 0) && ($notes_customer_result->fields['customers_id'] == $notes_active->customers_id)) && !isset($_GET['gID'])) 

  4. #114
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Admin Notes Advanced

    Quote Originally Posted by Design75 View Post
    I haven't looked at the complete code, but I think you can use something like:
    PHP Code:
    if(isset($_GET['cID']) && ($_GET['cID'] == $notes_active->customers_id) && !isset($_GET['gID']) ||(($notes_customer_result->RecordCount() > 0) && ($notes_customer_result->fields['customers_id'] == $notes_active->customers_id)) && !isset($_GET['gID'])) 
    Thanks for the help! Unfortunately, that threw a fatal error: PHP Fatal error: Uncaught Error: Call to a member function RecordCount() on null

    Zen Cart and it's community are the best!!

  5. #115
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,294
    Plugin Contributions
    125

    Default Re: Admin Notes Advanced

    That's your answer then. Prefix references to $notes_customer_result by

    !empty($notes_customer_result) && ...
    That Software Guy. My Store: Zen Cart Support
    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.

  6. #116
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Admin Notes Advanced

    Yes, that did it. Was just about to comment before you posted. Small win for figuring it out haha. Thanks to you both for helping! For anyone else, the complete line should be:
    PHP Code:
    if(isset($_GET['cID']) && ($_GET['cID'] == $notes_active->customers_id) && !isset($_GET['gID']) ||(!empty($notes_customer_result->fields['customers_id']) && ($notes_customer_result->fields['customers_id'] == $notes_active->customers_id)) && !isset($_GET['gID'])) 

    Zen Cart and it's community are the best!!

  7. #117
    Join Date
    Jan 2007
    Location
    Illinois, USA
    Posts
    312
    Plugin Contributions
    0

    Default Re: Admin Notes Advanced

    Has this been tested with ZC 1.5.7 yet?
    NTO: building a better network thru collaboration
    www.needtoorder.com | www.coffeewitheinstein.com

  8. #118
    Join Date
    Jan 2007
    Location
    Illinois, USA
    Posts
    312
    Plugin Contributions
    0

    Default Re: Admin Notes Advanced

    Quote Originally Posted by Carbonless View Post
    Has this been tested with ZC 1.5.7 yet?

    I installed on a test server. Displays the initial note on the admin page, but delivered an error log:

    Code:
    [15-Jan-2021 16:47:17 America/Chicago] Request URI: /XXXX/index.php?cmd=notes&nID=1, IP address: XXXX
    #1  zen_get_notes_categories_array() called at [/XXXX/notes.php:193]
    #2  require(/XXXX/notes.php) called at [/XXXX/index.php:11]
    --> PHP Warning: Use of undefined constant id - assumed 'id' (this  will throw an Error in a future version of PHP) in /XXXX/notes.php  on line 183.
    NTO: building a better network thru collaboration
    www.needtoorder.com | www.coffeewitheinstein.com

  9. #119
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,848
    Plugin Contributions
    11

    Default Re: Admin Notes Advanced

    Quote Originally Posted by Carbonless View Post
    I installed on a test server. Displays the initial note on the admin page, but delivered an error log:

    Code:
    [15-Jan-2021 16:47:17 America/Chicago] Request URI: /XXXX/index.php?cmd=notes&nID=1, IP address: XXXX
    #1  zen_get_notes_categories_array() called at [/XXXX/notes.php:193]
    #2  require(/XXXX/notes.php) called at [/XXXX/index.php:11]
    --> PHP Warning: Use of undefined constant id - assumed 'id' (this  will throw an Error in a future version of PHP) in /XXXX/notes.php  on line 183.
    i've never used it. in a cursory look, it could use a complete refactor. i'm guessing this is just one of many sort of errors in the code. last updated almost 4 years ago.

    for your specific error, you can try replacing the appropriate section as follows:

    PHP Code:
    function zen_get_notes_categories_array($all false){
      global 
    $db;
      
      
    $categories $db->Execute("SELECT * FROM " TABLE_NOTES_CATEGORIES " ORDER BY notes_categories_name");
      if(
    $all == true){
        
    $categories_array[] =  ['id' => 0'text' => 'All']; 
      }
      while(!
    $categories->EOF){
       
    $categories_array[] = ['id'=> $categories->fields['notes_categories_id'], 'text' => $categories->fields['notes_categories_name']]; 
       
    $categories->MoveNext(); 
      }
      return 
    $categories_array;
       

    best.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  10. #120
    Join Date
    Jan 2007
    Location
    Illinois, USA
    Posts
    312
    Plugin Contributions
    0

    Default Re: Admin Notes Advanced

    Quote Originally Posted by carlwhat View Post
    i've never used it. in a cursory look, it could use a complete refactor. i'm guessing this is just one of many sort of errors in the code. last updated almost 4 years ago.

    for your specific error, you can try replacing the appropriate section as follows:

    PHP Code:
    function zen_get_notes_categories_array($all false){
      global 
    $db;
      
      
    $categories $db->Execute("SELECT * FROM " TABLE_NOTES_CATEGORIES " ORDER BY notes_categories_name");
      if(
    $all == true){
        
    $categories_array[] =  ['id' => 0'text' => 'All']; 
      }
      while(!
    $categories->EOF){
       
    $categories_array[] = ['id'=> $categories->fields['notes_categories_id'], 'text' => $categories->fields['notes_categories_name']]; 
       
    $categories->MoveNext(); 
      }
      return 
    $categories_array;
       

    best.

    After replacing the code, this error log was created...
    Code:
    [15-Jan-2021 20:13:43 America/Chicago] Request URI:  /XXkcaz00/index.php?cmd=notes&page=1&nID=6&action=edit, IP  address: 184.170.174.172
    #1  require(/XXkcaz00/notes.php) called at [/XXkcaz00/index.php:11]
    --> PHP Warning: Use of undefined constant TEXT_INFO_NOTE_PRIORITY -  assumed 'TEXT_INFO_NOTE_PRIORITY' (this will throw an Error in a future  version of PHP) in /XXkcaz00/notes.php on line 425.
    NTO: building a better network thru collaboration
    www.needtoorder.com | www.coffeewitheinstein.com

 

 
Page 12 of 13 FirstFirst ... 210111213 LastLast

Similar Threads

  1. v153 Admin Name on Order Notes
    By jakumpe in forum Customization from the Admin
    Replies: 2
    Last Post: 11 Dec 2014, 01:49 AM
  2. Notes client only for admin
    By dmossi in forum Customization from the Admin
    Replies: 1
    Last Post: 2 Dec 2011, 05:43 PM
  3. Admin Notes addon
    By MtnVision in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 13 Dec 2007, 08:04 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