Jump to content

WHMCS Danny

WHMCS Technical Analyst
  • Content Count

    15
  • Joined

  • Last visited

  • Days Won

    3

WHMCS Danny last won the day on January 28

WHMCS Danny had the most liked content!

Community Reputation

6 Neutral

About WHMCS Danny

  • Rank
    WHMCS Technical Analyst

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello KNK, We have an ImportAssist tool that may be able to accomplish this. Please review this addon tool WHMCS developed at the below MarketPlace link: https://marketplace.whmcs.com/product/46-importassist Here is the documentation for the Migration Guide that explains this tool as well: https://docs.whmcs.com/Migration_Guide#ImportAssist Note: We do not recommend making edits to the WHMCS database directly. In version 7.5 we added automated data retention settings, which allows for the automated deletion of inactive clients: https://docs.whmcs.com/Data_Retention_Policy_Automation Have you tried this feature, as it was also updated in WHMCS 8.0 as well? The system can automatically change the client status now by using the Client Status Update setting to control this. Please review the below documentation on this setting for more information: https://docs.whmcs.com/Automation_Settings#Client_Status_Update If you are unable to use the ImportAssist tool, then you would have to follow the steps on manually adding services, domains and clients by following the Manual Entry section of the Migration Guide below: https://docs.whmcs.com/Migration_Guide#Manual_Entry I hope this helps. Someone may have some better advice with SQL commands but WHMCS Technical Support does not advise making edits to the database directly due to database relationships and the IDs of those relationships to other tables, that could cause issues down the road.
  2. Hi Friends, I have found some users that may need to add certain HTML code for many different reasons to the client area of WHMCS. This could be for tracking code, Google tag manager or a custom Live chat addon that you need to ensure their custom HTML code is added to a certain section on the page via HTML or JS code per the instructions of what you are adding to the client area pages. The best way to achieve this would to use a custom hook. Depending on where you need to place your HTML code on the page, you would use one of the below hooks: If you want to add HTML code to be placed in the <head> section of the page your would use the ClientAreaHeadOutput hook. If you want to add HTML code to be placed in the <body> section of the page you would use the ClientAreaHeaderOutput hook. If you want to add HTML code to be placed in the <footer> section of the page you would use the ClientAreaFooterOutput hook This assumes you are already familiar with creating hooks. For further information to learn how to create hooks please review the following developers documentation: https://developers.whmcs.com/hooks/getting-started/ Once your hook is saved under your /includes/hooks/ directory in your WHMCS installation, you can use the use your browsers developer tools to Inspect the client area pages to check that your code has be inserted where it needs to be placed or where you wanted it to be placed on the page. Instructions: I have provided example snippets below for creating a hook for each section to add HTML code to the client area pages for the <head>, <body> or <footer> sections of the client area pages after the PHP has been rendered. All you will need to do is insert your HTML code in between the <!-- Start insert code here --> and <!-- End insert code here --> comments in the below examples. ClientAreaHeadOutput Hook Example: The code you place in between the comments referenced above will add your HTML code to the <head> section of every client area page: <?php /** * The code below will be added in the <head> section * @author WHMCS Danny */ add_hook('ClientAreaHeadOutput', 1, function($vars) { return <<<HTML <!-- Start insert code here --> <!-- End insert code here --> HTML; }); Source: https://developers.whmcs.com/hooks-reference/output/#clientareaheadoutput ClientAreaHeaderOutput Hook Example: The code you place in between the comments referenced above will add your HTML code to the <body> section of every client area page: <?php /** * The code below will be added in the <body> tag section * @author WHMCS Danny */ add_hook('ClientAreaHeaderOutput', 1, function($vars) { return <<<HTML <!-- Start insert code here --> <!-- End insert code here --> HTML; }); Source: https://developers.whmcs.com/hooks-reference/output/#clientareaheaderoutput ClientAreaFooterOutput Hook Example: The code you place in between the comments referenced above will add your HTML code to the <footer> section of every client area page: <? /** * The code below will be added to the <footer> tag section * @author WHMCS Danny */ add_hook('ClientAreaFooterOutput', 1, function($vars) { return <<<HTML <!-- Start insert code here --> <!-- End insert code here --> HTML; }); Source: https://developers.whmcs.com/hooks-reference/output/#clientareafooteroutput I hope this information helps anyone who is looking on how to add HTML/JS code to your WHMCS client area, such as, a tracking code, Google tag manager or a custom Live Chat addon etc. Best Regards, - WHMCS Danny
  3. Do you get any other error at all other than the CSRF error? Please try using the browsers developer tools to see if there are any errors. It will show up in a highlighted red text in the console usually. You should also check the Network tab console too. Now, If this is only happening in Google Chrome browser, you should be able to resolve this issue by disabling SameSite by default cookies flag in Google Chrome. To disable, type chrome://flags in the address bar of your chrome browser and then disable the flag SameSite by default cookies. (This has also been reported with the Edge browser) Safari Browser - You have to untick Prevent cross-site tracking under Safari > Preferences > Privacy
  4. In In the root directory of your WHMCS installation. So if you have your WHMCS installed under /public_html/whmcs/ then you will find the configuration.php file in that root directory whmcs.
  5. The above hook code works. I tested it but the issue I think is that it is not actually hiding the custom fields. It does not allow you to save the custom fields. Even when I logged in as an Admin and logged in as Owner, I was still unable to edit the field. So this hook seems to just not allow editing at all for the custom IDs you place in that hook. So you will need a developer/programmer to edit the above code or provide you another hook. However, you can also just click on the Admin Only checkbox for the custom field and thats it for it to be only edited by the admin only. If you do not check "show on order form" it will not display these custom fields on the Account Details page via the client area. So, the above code does not allow these custom fields (IDs have to be edited depending on your custom field IDs) to be edited if the "Show on order form" is checked to show these fields in the Account Details page via the client area. Please explain on if you want the client to be able to edit these custom fields at all or what are you actually using them for so they cannot be edited? Maybe that will help one of our community members get a better idea on what you are looking to do...
  6. Hello, The above example is using an IF/ELSE statement, so the first line of code checks the product name and to only hide the ns1 field for the bronze product and you are correct. You would use what you have provided for the value and that is "NA". However, if you do not want to do this for every product you would still use the original value code of "{$server.ns1prefix}" in the ELSE part of the statement or it will not bring over the ns1 value. It would just bring over "NA" each time. So, you are correct if you want to do this for every product, you need to have a value of "NA" in there for validation purposes and you would want to do it for every product you would remove the IF/ELSE statement and just use this: <input type="text" name="ns1prefix" size="10" value="NA" /> I hope that makes sense.
  7. This should be possible with a template customization according to our documentation: http://docs.whmcs.com/Order_Form_Templates To only hide a field for certain products then something along the lines of this could be used: {if $productinfo.name eq 'Bronze'}<input type="hidden" name="ns1prefix" size="10" value="NA" /> {else} <input type="text" name="ns1prefix" size="10" value="{$server.ns1prefix}" /> {/if} I hope this is what you are looking for.
  8. Just want to inform everyone that the {$client_password} merge field is no longer available as of v8.0. Using it is will return empty. It has been removed from the default Client Signup Email template as of WHMCS 8.1. Please see CORE-15899 on the release notes for 8.1: https://docs.whmcs.com/Changelog:WHMCS_V8.1.0_GA
  9. Please make sure you have nameservers set for your server under System Settings > Servers > Your Server Name on the Edit Server Details page under the Nameservers section as well.
  10. That is correct, it is still currently in beta and is a release candidate but it is NOT recommended to update a production installation to a beta or RC. In fact, we always recommend to install a development license in a test environment before updating any production installation to make sure there aren't any surprises or issues. 🙂 If you login to the admin area of WHMCS and navigate to Utilities > Update WHMCS and then click on Configure Update Settings and select Release Candidate, Save Changes and then Check for Updates again you will have the option to update to version 8.1.0-rc.1
  11. Yes, I am hoping to see version 8.1 released to the public in the next week. Should be a nice Christmas present 🙂
  12. I personally have never seen this before but I am sure it is just SPAM or someone messing with you. I would not worry about it but you can enable the Google reCAPTCHA v2 to help stop these messages from being submitted by the contact form. Whilst no human verification captcha is 100% bullet proof, Google reCaptcha v2 is effective. This can be enabled in WHMCS on the Configuration (wrench icon) > System Settings > General Settings > Other tab. Once configured; this will help protect the client registration page, the ticket submission pages and contact form, as well as the homepage domain checker. Configuration settings are located under Configuration (wrench icon) > System Settings > General Settings > Security tab. For more information on securing your forms please review this help article: https://help.whmcs.com/m/troubleshooting/l/878335-blocking-spam-orders
  13. Hello, Where exactly are you getting this error at? Also, you covered the actual error itself so its hard to see whats happening but it looks like a PDOException error. First make sure that you are using the recommended or at the very least the minimum MySQL server version listed our system requirements page here: https://docs.whmcs.com/System_Requirements I also found an error starting with PDOException in my internal wiki and this specific error message that I am looking at means that the MySQL user does not have the proper permissions for the WHMCS database. Please ensure all permissions are granted for the MySQL user you are using in the configuration.php file but I am not sure if this is the case here since I cannot see the error from your screenshot. If you can let me know what the error is ill be happy to investigate further. Thanks!
  14. Sure, I was told that the stable release for 8.1 should be released within the next week or so. Thank you for your patience.
  15. Hello All, This issue was reported in bug case #CORE-15708 After reviewing the bug details, it looks like there was a mistake and this was not included in the Change log for 8.1.0-beta1. However, I can confirm that I've been unable to reproduce this issue in WHMCS 8.1 beta.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated