Forums / Addon Admin Tools / Admin Notes Advanced

Admin Notes Advanced

Started by paulm on 10 Sep 2008, 8:48 PM · Views: 30,028

Results 101 to 120 of 126
24 Feb 2014, 6:20 PM
#101
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Admin Notes Advanced

I am currently developing notes to explain each and every stock Zen Cart function for training purposes. Like converting the e-Start Zen Cart book into on-screen instructions.

Turn the training notes on and you've got a guide for new employees using any of the Twitch modules. Turn them off for top level admins that don't need to see the 'how to'.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

24 Feb 2014, 6:39 PM
#102
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,735
Plugin Contributions:
56

Re: Admin Notes Advanced

What does that have to do with Admin Notes?

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.

24 Feb 2014, 7:11 PM
#103
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Admin Notes Advanced

swguy:

What does that have to do with Admin Notes?

I'm using admin notes out of the box - to store notes about customers, orders, categories and products already, great sales tool!

However one of the most commonly asked questions is 'How do I use this module after it has been installed?' or 'I need to train my new employees with Zen Cart where do I start?'.

The current package can be modified to include notes that everyone could see on screen, essentially giving you the how-to book to operate Zen Cart on every page.

Once the e-Start manual is converted to admin notes, turn the status on and you'll see notes, off and they don't get in the way. Also, when someone installs a new module they'll (potentially) get the user manual included to give them the how-to knowledge on screen.

Another option is to setup an admin profile that has all of the admin training notes turned on. There is a growing need for Twitch POS to be a complete software solution to bridge bricks and mortar stores with web/mobile sales. That solution needs to be more functional for store owners with less steps/learning time and a how-to manual.

This is especially necessary when someone within the company is on holidays or passes away, the notes will remain.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

14 Mar 2015, 11:13 AM
#104
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Admin Notes Advanced

To prevent the following from appearing in your error log:

PHP Warning: mysql_insert_id(): Access denied for user 'root'@'localhost'
Change (in admin/note.php, 2x):

  $insert_id = mysql_insert_id();

To:

  $insert_id = $db->Insert_ID();

(mysql_insert_id() is deprecated as of PHP 5.5.0)

14 Mar 2015, 11:25 AM
#105
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Admin Notes Advanced

paulm:

Change (in admin/note.php, 2x):
Should be the admin/notes.php file of course.

16 Jun 2017, 2:35 AM
#106
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Admin Notes Advanced

I have updated this so the add customer note stops showing when editing a configuration field. This was occurring because both customers and config URLs contain cID. I simply added an extra condition in 3 files (notes, notes_buttons and init_notes_notifier) so thisphp isset($_GET['cID']) && (int)$_GET['cID'] > 0 became this```php
isset($_GET['cID']) && (int)$_GET['cID'] > 0 && !isset($_GET['gID'])


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

16 Jun 2017, 10:39 AM
#107
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Admin Notes Advanced

Nice to see this add on still is being used!

A bit unfortunate I never got to optimize the layout and some other details, but all in all still happy with the result :smile:

16 Jun 2017, 7:59 PM
#108
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Admin Notes Advanced

I am very happy that this mod exists! When there are multiple admins (6 for us, and growing), it is extremely helpful to have notes that others can refer to when dealing with something such as an order or product. Once I have the updated site finished and launched I may try to get some of the todo list for this done, have to see if the rust has been knocked of my coding enough to accomplish it. Thanks, paulm!


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

30 Jun 2019, 9:01 PM
#109
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Admin Notes Advanced

On PHP 7.1.30, and reporting all errors, I get this in my logs:

PHP Notice:  Undefined variable: notes_customer_result in  /xxx/ADMIN/includes/init_includes/init_notes_notifier.php  on line 67
PHP Notice:  Trying to get property of non-object in  /xxx/ADMIN/includes/init_includes/init_notes_notifier.php  on line 67

This is line 67:

if(isset($_GET['cID']) && ($_GET['cID'] == $notes_active->customers_id) && !isset($_GET['gID']) ||(($notes_customer_result->fields['customers_id'] > 0) && ($notes_customer_result->fields['customers_id'] == $notes_active->customers_id)) && !isset($_GET['gID'])) 

I have been looking to see what I need to change to eliminate these notices, but cannot figure this one out. I have tried declaring the $notes_customer_result as a global variable which does eliminate the first notice, but am not sure what is a non-object in the line to figure out what to change to make the notices go away.


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

30 Jun 2019, 9:06 PM
#110
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,735
Plugin Contributions:
56

Re: Admin Notes Advanced

You need to do some tests (like is_object) on
$notes_active and $notes_customer_result. I suspect one of them is not set the way it should be.

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.

30 Jun 2019, 9:15 PM
#111
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

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!!

30 Jun 2019, 10:03 PM
#112
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

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!!

1 Jul 2019, 7:02 AM
#113
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Admin Notes Advanced

I haven't looked at the complete code, but I think you can use something like:

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']))
1 Jul 2019, 5:29 PM
#114
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Admin Notes Advanced

Design75:

I haven't looked at the complete code, but I think you can use something like:

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!!

1 Jul 2019, 5:33 PM
#115
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,735
Plugin Contributions:
56

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.

1 Jul 2019, 5:56 PM
#116
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

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
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!!

15 Jan 2021, 5:44 PM
#117
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

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

15 Jan 2021, 10:51 PM
#118
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Admin Notes Advanced

Carbonless:

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:

[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

16 Jan 2021, 12:22 AM
#119
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Admin Notes Advanced

Carbonless:

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

[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
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, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

16 Jan 2021, 2:16 AM
#120
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Admin Notes Advanced

carlwhat:

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:

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...

[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