mauwiks Posted November 6, 2019 Share Posted November 6, 2019 Hi everyone! Thank you for your attention to this concern. I'm just wondering how do we show a custom note for a certain product or service on the client's perspective? The scenario is that I would like to show the username & password, along with a few notes of a certain service order by a client along with a hosting package. I know it is possible to show via email if I would do customize the templates but would really like to show it off on the services area so clients do not need to browse their emails and find right on their client area anything they need to know about the products/item. Can anyone recommend any module or a hook for this? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 6, 2019 Share Posted November 6, 2019 purely in terms of the client notes concept, a non-programming way to do that would be to use a Product Custom Field (probably a text area I would have thought) - by default, a PCF should be shown on the product details page in the client area. with regards to username/password etc, where exactly on the page do you want to show them ? I have a sidebar hook that can show service information on the product details page... I fixed the above hook code for a client in July, but it was originally written years ago by Tom @ WHMCS Guru - I can post the updated hook if this is what you want to use. 1 Quote Link to comment Share on other sites More sharing options...
mauwiks Posted November 6, 2019 Author Share Posted November 6, 2019 4 hours ago, brian! said: PCF should be shown on the product details page in the client area I don't think it would because I am using a custom field with the things I wanted to show but it only shows on the order information email or invoice. If it does, maybe I am not aware of how. Can you enlighten me? 4 hours ago, brian! said: I can post the updated hook if this is what you want to use. Thanks This is something I want as well but I'm much more specific with the addons and how I can write a note through my admin area and then it can be shown on the client area of each service or item. Thanks a lot @brian! 0 Quote Link to comment Share on other sites More sharing options...
mauwiks Posted November 6, 2019 Author Share Posted November 6, 2019 I want something added here such as a note (anytime, by the admin) or when I would like to: http://prntscr.com/ptflgz (Add-ons section item) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 7, 2019 Share Posted November 7, 2019 14 hours ago, Mauwiks said: I don't think it would because I am using a custom field with the things I wanted to show but it only shows on the order information email or invoice. If it does, maybe I am not aware of how. Can you enlighten me? you could create a custom field, but leave all the checkboxes unticked... so it won't be shown during ordering or invoicing, only on the product details page... in the admin area, you can enter/edit the text from theiir profile product tab.... and in the client area product details page, it will be shown as below (example is a cPanel product)... 14 hours ago, Mauwiks said: I want something added here such as a note (anytime, by the admin) or when I would like to: http://prntscr.com/ptflgz (Add-ons section item) for addons, you can do something similar to above (as product addons can have custom fields too), but you'd need additional hook coding as the product template can't access addon custom fields by default... so first, you would need to edit the SiteLock Lite Addon in the admin area and give it a custom field... as before, don't tick any of the checkboxes... actually, you could tick the Admin Only checkbox if you wanted to, as the hook pulls the value for this custom field directly from the database. next, you would need to go to the addon service in the client's profile tab and enter your notes into the custom field... and then in the admin area, the hook will add the custom field value to the panel output... depending on how/where you want to output this note, it may well be easier (necessary!) to edit the template and add the Smarty variable {$addon.notes} in there rather than having the hook output it... not least, because the notes output is currently located within a 50% width col-6 div and i've no idea if your intentions for these notes are simple one liners, or War & Peace! if a product addon doesn't have a note, then the hook won't make any changes. ... and then you repeat the steps for each product addon that you want to the option of adding custom notes to. 0 Quote Link to comment Share on other sites More sharing options...
mauwiks Posted November 7, 2019 Author Share Posted November 7, 2019 Thanks a lot to this. I will look into it in a few. My intention is to output multiple lines or maybe a text area. Once again, many thanks! 0 Quote Link to comment Share on other sites More sharing options...
mauwiks Posted November 8, 2019 Author Share Posted November 8, 2019 7 hours ago, brian! said: it may well be easier (necessary!) to edit the template and add the Smarty variable {$addon.notes} in there rather than having the hook output it May you elaborate this statement? Do I need to edit the template or just use the hook? or else need to do both? Thanks for your assistance 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 8, 2019 Share Posted November 8, 2019 10 hours ago, Mauwiks said: May you elaborate this statement? Do I need to edit the template or just use the hook? or else need to do both? can I be unhelpful and say no to the first, but possibly yes to the other 2. 😛 for this solution, you'll always need the hook as that's pulling the customfield value from the database for each addon. why I added that statement was because I didn't know how lengthy your notes were going to be or where you wanted to show them - currently, all the panel body output is contained within a 50% width div-6 column (along with the rest out the output) - the RED square in the above screenshot. if you are happy for your custom notes to be shown within the area of that red box, then you don't need to do anything - the hook takes care of it. 🙂 however, if you are going to want the content of these custom notes to be shown using the full width of the panel - the BLUE square - then that's when you would likely have to edit the template. in your screenshot, you show the panel body being full width, whereas in reality, the panel body is only half-width... the management buttons are displayed in a full width div, so you could tweak the hook to move the custom fields output to below the buttons by changing ['nextduedate'] to ['managementActions']. if you wanted to make the panel body full width (as per your screenshot), then that would be a simple template edit of changing <div class="col-md-6"> to <div class="col-md-12"> within the <div class="tab-pane fade in" id="tabAddons"> block of code in clientareaproductdetails.tpl... I hope that clarifies if/when you would need to edit the template. 🙂 0 Quote Link to comment Share on other sites More sharing options...
mauwiks Posted November 8, 2019 Author Share Posted November 8, 2019 Well said. Loud and clear. Many thanks, Mr. @brian! 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.