Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


string last won the day on May 15 2019

string had the most liked content!

Community Reputation

20 Excellent

About string

  • Rank

Recent Profile Visitors

5635 profile views
  1. I suggest to inspect the content of $vars. E.g.: function generate_custom_invoice_number_4Client_hook($vars) { logActivity (json_encode($vars)); $invoiceid = $vars['InvoiceID']; $customnumber = 'WTW'.date("Y").str_pad($invoiceid,5,"0",STR_PAD_LEFT); //if (isset($customnumber)) { // would be always true... if (!empty($invoiceid)) { try { $updatedInvoiceNumber = Capsule::table('tblinvoices') ->where('id', $invoiceid) ->update(['invoicenum' => $customnumber,]); } catch (\Exception $e) { logActivity ($e->getMessage()); } } } add_hook('AfterShoppingCartCheckout', 1, "generate_custom_invoice_number_4Client_hook"); Then check the WHMCS activity log to see what $vars contains. This will also reveal whether the hook is executed at all.
  2. I don't usually create threads like this since this probably happens often and is not worth discussing, but the audacity I just experienced is grandious. I was analyzing a problem of a customer who bought a module. His WHMCS was behaving quite strangely. I quickly realized that the problem must be caused by another plugin and so I started to search. After a short time I found out that the problem is caused by the plugin API Whatsapp from the "developer" mmhospedagem.com.br. So I looked to see what it was doing - the source code was not encrypted - and realized that the module was using code from one of our modules. Our module is encrypted, so they decrypted it and took parts of it. Now the bizarre thing - they didn't even rename the function names or the MySQL table. They just copied the code 1:1. Probably the module is also otherwise thrown together from code from Stackoverflow 😄 But it goes even bolder. So I looked to see if mmhospedagem once bought the module in question (it's called "Auto Login From Mails") and yes, he did. After the purchase he opened a PayPal dispute and wanted his money back. Well, he lost the case, if I remember correctly. I don't really know what the thread is supposed to accomplish, I guess I just had to share what I have experienced. If another developer sees the thread here and gets an order from these people, well, your property is in danger i would say 🤦‍♂️
  3. Why do you think that? https://www.whmcs.com/company/
  4. For sure. I totally agree. Today is the most beautiful day for WHMCS alternative companies. I think Blesta will emerge as the winner from all the alternatives. And well, even if WHMCS lowers prices - which they won't - the trust would be gone and anyone in their right mind would still switch.
  5. I'm not sure if we can really blame the WHMCS team. Except for Matt Pugh, the CEO. Because he certainly knew exactly how the whole thing would end when he sold it. I can well imagine that some – or even the most – of the WHMCS staff don't like the price hike either. WHMCS has become the toy of WebPros and now they are making money as much as they can. Just like they did it before and just like they will do with Plesk.
  6. It would be better if you kept these theories to yourself. Otherwise you'll give them ideas 😅 A lot of people will still use WHMCS before the userbase gets smaller and smaller.
  7. You need to pass the encrypted string to the DecryptPassword API.
  8. For this issue, I must defend whmcsservices. It was some time ago and I can't remember the details, but I also had the "usedhooks" problem with a module of my own. WHMCS v8 has changed something - presumably it's a bug - which under certain circumstances tries to write to the tblusers.usedhooks column, even though this isn't defined in any way. Even though I'm pretty sure it's a bug in WHMCS, I didn't bother to report this to WHMCS as the problem 1.) will not be solved for older versions anyway and 2.) it will probably take a long time before a fix appears. Instead I solved the problem via workaround, which took quite some of my time...
  9. Unfortunately WHMCS does not offer an simple way to add more states. Have a look at the following feature request, there you will also find links that show how you can add states: https://requests.whmcs.com/topic/allow-stateregion-overrides
  10. 🙂 I guess its the "$" what causes the issue.
  11. <input pattern="{literal}[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}${/literal}" type="email" name="email" id="email" class="field form-control" placeholder="Email Address" required> Please try this. Here is the excerpt from the Smarty documentation explaining what literal does:
  12. Purchase module - 19,99 Euro / year Mail Tracker For WHMCS automatically adds an invisible 1x1 pixel tracking code to your mails so you can determine the read status of your mails. The module records when the customer read the mail for the first time, how many times he read it and when he read it last. The module page offers you a unique insight with detailed information, statistics and various filtering options. Mails can be tracked either globally, or only specific email templates (for example, newsletters). The module page is fully based on AJAX and all actions are performed without page reloads. This allows a very convenient evaluation of the statistics. Click here to view screenshots. Features Easy setup. You only need to add one variable to your email template. Mails can be tracked globally or per email template. AJAX based module page to analyse the statistics. Read status can be shown on the "Summary" profile page tab (optional). Read status can be shown on the "Emails" profile page tab (optional). IP logging can be disabled. IP addresses can be pseudonymized. Logs can be deleted after a configurable number of days. Free Trial For all modules, a free trial is available. Click on the purchase link on the top of the site to order. Please note the requirements for a free trial on the page. Compatibility The module does work with WHMCS v6.0 and above.
  13. Before making changes in the database, it should be confirmed if there are any slow queries at all or how long the queries take. This can be determined via the MySQL query log. But even if there are slow queries, I would advise against making changes to the WHMCS database, this is certainly not recommended / supported by WHMCS. Instead, I would recommend optimizing the configuration of the MySQL server. Optimizing the MySQL server also has the most potential. I'm not assuming this, but if you're using the default configuration, there are definitely things to tweak (innodb_buffer_pool_size, innodb_buffer_pool_instances, innodb_read/write_io_threads, ...).
  14. The default country value is not a dynamic value. It is configurated here: https://help.whmcs.com/m/localisation/l/678184-set-your-default-country-and-language To adjust the currency list after your client has changed the country, you would need to use javascript.
  15. WHMCS doesn't offer a native way to do this. You can do this using an hook. Save the following code into the file /includes/hooks/<a-readable-understandable-name>.php: <?php add_hook('ClientAreaPageAddFunds', 1, function($vars) { unset ($vars['gateways']['paypal']); return array("gateways" => $vars['gateways']); }); Just replace "paypal" with the name of the payment gateway. You must use the system name of the gateway, not the friendly name. To find out the system name, open the add funds page, look at the source code of the page via your browser and search for "paymentmethod". You will find a <select> tag where you can read the names. But you have to be aware that tech-savvy users could spoof the HTTP request by manually setting the value to the gateway's name. It is unlikely that this will happen, but if you want to be sure, you would have to cross-check the POST request as well.
  • 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