Jump to content

string

Member
  • Content Count

    140
  • Joined

  • Last visited

  • Days Won

    5

string last won the day on September 15

string had the most liked content!

Community Reputation

30 Excellent

About string

  • Rank
    Newbie

Recent Profile Visitors

6136 profile views
  1. I would return false in the refund function and change the error message to its own text via javascript using the AdminAreaFooterOutput hook, maybe even change the CSS class so that the notice doesn't appear in red. After you received the callback from Paddle, you process the refund properly. It would also be useful to notify the staff about the output of the refund, for this you can either create a ticket or use the WHMCS notification system. In order to continue to use the normal refund function from WHMCS, I would add a second argument to the function, such as: function paddle_refund ($params, $fromCallback = null) { if ($fromCallback) { .... return [ 'status' => 'success' ]; } else { .... return [ 'status' => 'error' ]; } }
  2. You probably added the hooks.php file after the module was activated. If you add the file after the module activation, WHMCS will not load it automatically. To solve the problem, go to the addon settings and click on "Save Changes" for the relevant module without changing any settings. The hooks.php file will then be recognized by WHMCS.
  3. As you know, the common procedure would be to adjust php.ini. I don't see any resulting issue with plugins or similar due to the lifetime increase. If you don't want to do that, the only alternative I can think of would be an AJAX request in the background to keep the session active. This would work by having your browser send a request to the server every few minutes via AJAX so that the session doesn't expire. But this requires that you always keep the tab open in the browser. A hook to accomplish this is quickly created. If this is an option for you, let me know.
  4. The invoice description can be changed via the WHMCS hook InvoiceCreationPreEmail. Unfortunately I don't have a hook for this. I would recommend to have a look in the marketplace if there is a module for it. Alternatively you can look for a developer in the Service Offers & Requests section, if nobody else can provide you a hook.
  5. Not sure where you read that this is for the admin panel. It's for the client area. Just try it.
  6. https://help.whmcs.com/m/customisation/l/680995-previewing-a-template This is the easiest way 🙂
  7. Thats pretty easy, we have this line in the script: $data['pricing'][$values['11']]['monthly'] = $values['12']; $values['11'] is the currencyId from the CSV and $values['12'] the monthly pricing. If you want to add a second currency, you would add: $data['pricing'][$currencyId]['monthly'] = 'PRICE'; // $currencyId = e.g. "2"
  8. The file must be uploaded into the root directory of your WHMCS installation. I suggest to test it first in a developer WHMCS installation 🙂 I am not sure if your custom columns MFG / MPN are in tblproducts, so you would have to adjust the script if it is in tblpricing. importProducts.zip
  9. If you are not too bad at hacking scripts together, feel free to post a sample line of your CSV and i will post an example script 🙂
  10. You can receive the module configuration via the \WHMCS\Module\Addon\Setting class: https://classdocs.whmcs.com/8.2/WHMCS/Module/Addon/Setting.html Alternatively you can find the module configuration values in the database table tbladdonmodules.
  11. Unfortunately I do not have a premade script (and I don't think anyone can give you a completed script, since the format in your file will surely be different and the requirements may also), but in case you haven't seen it, WHMCS offers an API for adding products: AddProduct API.
  12. You write, that you are using WHMCS v7. But the admin page shows a WHMCS v8 installation. The exception contains the word "Forbidden", so my first thought would be a permission problem (wrong chmod / chown?). However, against this theory speaks that this problem would then probably not only occurs when creating customers. I have also found this knowledgebase entry from WHMCS, which also refers to a problem where the error message contains "Forbidden": https://help.whmcs.com/m/v80/l/1309724-troubleshooting-a-clientrequired-forbidden-error-when-deleting-quote-items According your screenshot, you are not using the latest WHMCS version. I would therefore suggest to update your WHMCS installation. Maybe it's a WHMCS bug. Beside of this, i suggest following: Remove the files at the /includes/hooks directory and retry it. Don't just recopy the WHMCS files, but delete WHMCS completely from your server and upload a fresh copy. This ensures that there are no leftovers. About point 2: You could use "rsync --delete --dry-run" to check in advance what differences there are between the content on your server and the original data. If all this does not help, you will have to contact the WHMCS support.
  13. You can use the AfterModuleCreate hook. And you can use "logActivity (json_encode ($params))" to find out, what data the $params array contains. Then you use Capsule to insert your data into the database. In my opinion, the documentation of the AfterModuleCreate Hook is sufficient, there isn't really more to describe about this hook. What information are you missing exactly?
  14. Maybe you can decrypt the content using DecryptPassword. DecryptPassword also has an API endpoint so you can use that directly in your node.js app. Unfortunately I have not checked yet how WHMCS stores the sessions in the database. If that not works, let me know and i will check if i see a way.
  15. I don't think WHMCS has an API endpoint for this. The way I would do it is to create a PHP script on the WHMCS server that returns the client's data when called. For example, you can use the PHP session (DOLLAR-SIGN_SESSION) to determine if the client is logged in and which client it is. You then return this information as (e.g.) JSON. Like that: Create a simple PHP script, e.g. under: http://domain.com/whmcs/getClient.php When someone opens your website, the visitor makes an AJAX call to getClient.php. Then the output of getClient.php is processed client-side and your javascript should adjust the output of your website accordingly. If you don't want to just display data, but do things with the account, you'll obviously need to do the check server-side, for security reasons. You would query the session ID of the client and then read the session from the server. For this you either read the content from the session file (use phpinfo() to find out where your sessions are) or from the database. Depending on how WHMCS is configured: https://docs.whmcs.com/Sessions Whereby a client-side processing would be possible by creating your own API in WHMCS (like getClient.php), in which you make sure that the user is logged in. PS: The WHMCS server blocks my post if i write DOLLAR-SIGN_SESSION - this is why i have wrote DOLLAR-SIGN_SESSION. Surely you know that you need to replace "DOLLAR-SIGN" with the actual char.
×
×
  • 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