Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Kian

  1. One thing that annoys me is that in WHMCS there's no clear difference between Deprecated and Removed. As you know there's a big difference between them but to me it looks that WHMCS use both terms as synonymous. If they remove Six I want to ⚰️ Why? Don't you like an ocean of white with paddings that extend from Milan to Tokyo? I have a 34" inch display 21:9 and with twenty-one I'm reading contents as if they were written on a recepit. Every page I open hurts my eyes. All white and bland. We have huge screen space but less information. I don't know about you guys but my full-time job can't be to keep up with unwanted changes and bugs of WHMCS. I'm still dealing with bugs that originate from v4 to v8 and now there's Bootstrap 4 and twenty-one. Maybe this is the reason why WHMCS developers are almost extinct. Back to the new template system, if they remove six I'm probably done with this software. I also work with Amazon, eBay and tens of other Marketplaces including couriers and logistics networks. They are a joke compared to WHMCS maintainability. Let me explain. If you happen to have modules with many front-end pages you are screwed because: You need to make your templates compatible with Twenty-One In the same time you still have to support Six And people that are still running WHMCS v5, v6, v7 and v8 (not v8.1) Basically we are talking about doubling efforts. Imagine you have 3 modules with lot of complex front-end pages. Now you have to maintain 6 templates. This is ridiculous. "Minimal" is the new word to use when you want to say "I am lazy and I don't want to spend time creating a decent UI hence let's pretend this is minimalism"
  2. Yes but editing tpl doesn't give you the possibility to run custom PHP scripts (when using hooks isn't possible).
  3. With an .htaccess rule like this one RewriteRule ^$ ./anypageyouwant.php [L] You can replace default index page with anything you want.
  4. Speaking in general, the more index you have the faster SELECT proform. Especially if such index are used for JOIN. And we all know that the above tables are super-connected with eachother. That being said, there is another side to the coin. The overuse of index slows UPDATE, INSERT and DELETE statements. Simply put, it's a competition between data retrieval and manipulation. You can't be fast at both* In other words with the above queries on paper you make "reads" faster but be prepared to wait a little longer when you update prices, configurable options etc. * Actually you can. On tables with heavy data manipulation you ideally use only the primary index. This way updates, iserts and deletes are super fast. When it comes to retreiving data, every X minutes you export & sync data to a secondary table fully indexed. This way you can perform select, sort, join, group, having, where (...) in the most efficient way.
  5. There's nothing wrong. What you see here is the result of Hook Debug Mode. It shows you when/how each hook fires. FraudCheckFailed is an hook point that as far as I know always triggers as it's part of WHMCS workflow even if you are not using any anti-fraud system.
  6. I could be wrong (I'm not using standard module functions in my projects) but your my_mod_activate() function should be based on the latest version of your module. Let's say you released the following versions: 1.0.0 1.0.1 - You changed this: UPDATE sometable SET animal = 'Dog' 1.0.2 - You changed this: UPDATE sometable SET animal = 'Cat' In my_mod_upgrade() you have the following: function my_mod_upgrade($vars) { $currentlyInstalledVersion = $vars['version']; if ($currentlyInstalledVersion < 1.0.1) { // UPDATE sometable SET animal = 'Dog' } if ($currentlyInstalledVersion < 1.0.2) { // UPDATE sometable SET animal = 'Cat' } return; } my_mod_activate() need to be like this: function my_mod_activate() { // CREATE sometable (animal VARCHAR(30) NOT NULL) // INSERT INTO sometable (animal) VALUS ('Cat') } As you can the the activation uses "Cat" (the value of the latest version). That said, your my_mod_config() needs to go with version 1.0.3. In other words fresh installation do not trigger upgrade function. function my_mod_config() { $configarray = array( "name" => "My Module", "description" => "Description goes here....", "version" => "1.0.3", "author" => "ChrisTERiS", "language" => "english", "fields" => array( )); return $configarray; } Edit: please, ignore my versioning (the 1.0.0). I suspect that WHMCS supports only 1.0 format.
  7. It is worth to say that the linked hook only tracks page views. Moreover the same approach can't be used to track other events (eg. purchase).
  8. This feature does not exist in WHMCS but can be implemented. You can automatically assign each quote to the person who created it using sessions and an action hook.
  9. Don't put the article about "regime dei minimi" in company details. It should be placed in invoice footer. Same goes for "marca da bollo".
  10. Make sure you used TCPDF syntax. invoicepdffooter.ppl doesn't use Smarty. Something like follows. $pdf->Ln(-5); $pdf->SetFont($pdfFont, '', 6); $pdf->MultiCell(140, 5, 'The cat is on the table', 0, 'C', '', 1, 35, '', true);
  11. Edit viewinvoice.tpl and invoicepdf.tpl and add a simple if statement that shows your new company details when invoice date is >= 1st January 2021 (otherwise show old company details).
  12. Well, it is super simple. All it takes is this script. <?php add_hook('AffiliateClickthru', 1, function($vars) { header('Location: https://google.com'); die(); }); Place it in includes/hooks directory (create a file namedAsYouLike.php) and replace google.com with your site.
  13. You could simply hide terminated products from clientarea. Open templates/{YOUR_TEMPLATE}/clientareaproducts.tpl. You'll find something like this. {foreach key=num item=service from=$services} {if $service.status == 'Terminated'}{continue}{/if} <tr onclick="clickableSafeRedirect(event, 'clientarea.php?action=productdetails&id={$service.id}', false)"> <td class="text-center{if $service.sslStatus} ssl-info{/if}" data-element-id="{$service.id}" data-type="service"{if $service.domain} data-domain="{$service.domain}"{/if}> {if $service.sslStatus} <img src="{$service.sslStatus->getImagePath()}" data-toggle="tooltip" title="{$service.sslStatus->getTooltipContent()}" class="{$service.sslStatus->getClass()}"/> {elseif !$service.isActive} <img src="{$BASE_PATH_IMG}/ssl/ssl-inactive-domain.png" data-toggle="tooltip" title="{lang key='sslState.sslInactiveService'}"> {/if} </td> <td><strong>{$service.product}</strong>{if $service.domain}<br /><a href="http://{$service.domain}" target="_blank">{$service.domain}</a>{/if}</td> <td class="text-center" data-order="{$service.amountnum}">{$service.amount}<br />{$service.billingcycle}</td> <td class="text-center"><span class="hidden">{$service.normalisedNextDueDate}</span>{$service.nextduedate}</td> <td class="text-center"><span class="label status status-{$service.status|strtolower}">{$service.statustext}</span></td> <td class="responsive-edit-button" style="display: none;"> <a href="clientarea.php?action=productdetails&id={$service.id}" class="btn btn-block btn-info"> {$LANG.manageproduct} </a> </td> </tr> {/foreach} The trick is in the 2nd line. This way you can skip Terminated products or any other status you want. {if $service.status == 'Terminated'}{continue}{/if}
  14. You can't upgrade/downgrade a product that has an overdue invoice. First you have to "close" the existing unpaid invoice.
  15. Within in next few hours, I'll release an update that will do the following at 00:00 o'clock: Reset invoice / credit note sequantial numbers Enable the new XML format for italian electronic invoices Remove UK from EU & MOSS The problem is that I still don't get if I should also do the following: Remove UK from VIES Turn off tax exempt for UK companies Gibraltar, Isle of Man, Jersey, Guernsey Anyway I'm pretty sure that I won't do anything here as everyone has an opinion.
  16. Use AffiliateClickthru hook point to redirect users anywhere you want with a PHP header location.
  17. It's always the same old story. Form over substance. Too much style killing usability. Buttons that don't look like buttons anymore. Icons, mouse-hovers and modals in place of actual data. It looks like we play hide-and-seek. As technology evolves, I find myself clicking more often to get what I want. Not to mention misconceptions around minimalism UI design where designers remove data, statistics and features. This is not minimalism, it's called going backward. The most irritating thing is that we're talking about backend. I want tables, filters and raw data. I don't care of jQuery effects and ajax posts. But who cares? I've stopped beating a dead horse. Embrace the future. In 2030 WHMCS admin interface will look like this.
  18. I know it sounds a little bit cliche, but cycling, gym and running works great for me. It boosts mental health and concentration... unless I meet idiot drivers and cyclists then we start fighting 🤬 but it is still better than overworking. Eating good stuff to reward yourself and living with gf / wife / someone also helps as we can't meet with friends.
  19. As far as I know WHMCS has a feature that automatically makes payment date equal to invoice date. It should be Setup > Payments > Tax Configuration > VAT Settings > Set Invoice Date on Payment. I could be wrong here but I'm pretty sure it works. The thing is that I coded many things for WHMCS billing and I can no longer distinguish between what's is mine and what is WHMCS.
  20. I had to stop using PreModuleCreate for the better 😕 Few weeks ago I realized that this hook point acts weirdly. Yes, it changes the password used for provisioning BUT in the same time stores a different password in tblhosting.password. The only way to make it sure that both password are the same, is via OverrideModuleUsernameGeneration 😥
  21. Use InvoiceChangeGateway to add, remove or ajdust a new invoice item via UpdateInvoice API with your "fee" but keep in mind that imposing surcharge to customer is not allowed (ask Ryanair ✈️): By EU regulations By specific countries (eg. Italy) By payment gateways (eg. PayPal - User Agreement > Accepting Payments from Buyers > No surcharges) Fines are real 🥵
  22. It's always been like that since the div in question is a simple "pull-right" that doesn't go on a new line. You can fix that with a bit of jQuery but it is a bit of overkill.
  23. Simply change the selector accordingly. I'm using select#inputBillingcycle. You'll need to replace it with your radio and ID or name attribute. As for your other question, you can add an onload event that triggers the function. This way the message appears on page load. I can't provide you any code now (not at home).
  • 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