SeanP Posted March 8, 2021 Share Posted March 8, 2021 Sorry if this has already been posted. I searched, but didn't find what I was looking for... Does anyone have a module, or custom code, to allow clients to add/edit a note next to each service within their "My Services"? We have some clients who lease several systems from us, and it would be helpful to them to be able to label the servers in order to reference what they are used for. For example, if one is an application server, one is a database server, and one is a web server, it would help if the client can have an editable note field on each one to specify which one provides which service. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 8, 2021 Share Posted March 8, 2021 Looking around the marketplace, I did not find any that would allow editing of notes. This could be done with a couple different hooks, though an addon module would likely be better. One hook to inject the notes field, one hook to watch for a POST of that notes field for saving. Using the service's notes field would be the easiest option I think as otherwise you would need a custom field or database table for storing the notes. A service custom field that can be updated by the client would be handy in this case for just a simple label. Are you using your own module or a third party? If own, you could role that in to that module's clientarea function or using a custom action function to save the notes field. 0 Quote Link to comment Share on other sites More sharing options...
SeanP Posted March 9, 2021 Author Share Posted March 9, 2021 We using our own server module, and may have to look into this. I was just hoping someone already had something written I could purchase as an addon. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 10, 2021 Share Posted March 10, 2021 Ah in that case, using a service custom field or the notes field should do depending on if you use the notes field for something already . 0 Quote Link to comment Share on other sites More sharing options...
SeanP Posted March 10, 2021 Author Share Posted March 10, 2021 I can create a custom field on the product, but would need to have the ability for the client to edit that field. When you say "notes field", are you referring to the order notes field? 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 10, 2021 Share Posted March 10, 2021 (edited) Since your dealing with your own server module, that would be up to you on how that is done. Many ways to do that from an ajax request with a field and a button to a custom function and client area custom button. Doing the ajax request would likely be easiest to setup. The notes field I am referring to is the notes textarea field under the service page . It is below the username, server, domain, etc fields and just above the submit buttons when viewing a service within the admin. In terms of saving that field, it should be possible by getting the Service via the internal class, setting the notes field, and then saving the service. Off the top of my head without testing, that should look like: $Service = Service::find($ServiceID); if ($Service) { $Service->notes = $NewNotes; $Service->save(); } How you actually get the $NewNotes is up to you. 😉 Similar setup can be done for custom fields. Edited March 10, 2021 by steven99 chevrons help 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.