Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Welcome to WHMCS.Community stevenson! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  3. Yesterday
  4. Hi guys, I use fail2ban on my server. WHMCS is a subdomain on the same server. I am just wondering, what is normally required to be done in fail2ban for whmcs to work with 1. auto-provisioning services on said server and 2. sending email notifications in whmcs through smtp/phpmail?
  5. Kian

    Domain sync issues and overall messiness

    Here is how you offer free domain with hosting package. As for transferred domains I think that you'll need to manually (or automatically with a custom action hook) sync the Next Due Date of the domain in question and its related hosting package this way they will be tied together. When customers transfer their domain to you, the remaining time they have with their current Registrars plays a role in the Expiry Date. Let's suppose that the transferred domain expires in 6 months from now. For generic TLDs the renewal period (1 year) is added to the current expiry date. In other words the domain will expire in 12 + 6 months from now. Technically a customer could transfer a domain that expires in 2025 😀 It happens when you change Registrar frequently. That's why in WHMCS Next Due Date and Expiry Date don't match. That said, what you see in Expiry Date is irrelevant. Even though the domain expires in 2025 your customer must pay you on a yearly basis. In other words Next Due Date is the only thing that you have to care about. You could consider Expiry Date as a "courtesy" date for you and your customers. When it comes to country-code extensions, rules could be different. A lot of TLDs don't give a damn about the remaining time. When the domain is transferred Expiry Date simply is current date + 12 months. Editing Expiry Date makes no sense if you are using Auto-Sync since it will override your changes.
  6. Kian

    service renewal confirmation message

    This hook should work. <?php use WHMCS\Database\Capsule; add_hook('InvoicePaid', 1, function($vars) { // Retreiving Products/Services from the invoice that has been just paid $HostingItems = Capsule::select(Capsule::raw('SELECT t2.id FROM tblinvoiceitems AS t1 LEFT JOIN tblhosting AS t2 ON t1.relid = t2.id WHERE t1.invoiceid = "' . $vars['invoiceid'] . '" AND t1.type = "Hosting"')); // Foreach Product/Service that has been renewed I send the "Product Renewal Confirmation" (read post below for more details) foreach ($HostingItems AS $v) { $postData['messagename'] = 'Product Renewal Confirmation'; $postData['id'] = $v->id; $results = localAPI('SendEmail', $postData); } }); The hook requires an Email Template to send the renewal confirmation via email. Go to Setup > Email Templates and press Create New Email Template with the following settings: Email Type: Product/Service Unique Name: Product Renewal Confirmation Email Title: Product Renewal Confirmation (feel free to change it) Email Body: (see below - Feel free to customize it) <p>Dear {$client_name},</p> <p>Thank you for your renewal order. Your renewal request for the product listed below has now been completed.</p> <p>Product/Service: {$service_product_name} {if $service_domain} ({$service_domain}){/if}<br />Renewal Length: {$service_billing_cycle}<br />Renewal Price: {$service_recurring_amount}<br />Next Due Date: {$service_next_due_date}</p> <p>You may login to your client area at <a href="{$whmcs_url}">{$whmcs_url}</a> to manage your domain.</p> <p>{$signature}</p> Preview:
  7. Today marks a huge milestone for Zomex! As of the 25th of May 2019 we have now been in business for 10 years! I would like to thank each and every one of you for continuing to support Zomex over the years. It has been an absolute pleasure developing templates, providing services and more importantly replying to your support requests over the last 10 years. Zomex is my baby, my passion and my life and it goes without saying that I will continue to dedicate my time and energy to Zomex's continued growth. Together we will take it to the next level, Here's to the next 10 years! To celebrate this huge milestone we have launched our biggest sale yet! For 3 days only starting now you can receive a huge 25% discount on your order using coupon: 10yearanniversary during checkout! View our full announcement: https://www.zomex.com/clients/announcements.php?id=225
  8. Not clear why the method is "weird and confusing". Banners are yet another post type and this is the norm for any post type, in that 1 image is entered per post instance. The difference is that the banner type is not displayed as individual pages, hence the need for an output widget which collects data and display as instructed in one or multiple positions/sidebars on one or more pages. The below image shows single instances of banners with separate database row ID within the same banner category. The banner display widget requests an array and output 4 as instructed. This allows the click and impression tracking function to record per banner item. The widget can select banner items from 1 or multiple categories or by specified IDs.
  9. I get your logic now, however this is a weird and confusing setup.
  10. I've written one that interfaces with our switches (although not Cisco the principal is the same) and APCs via SNMP - switchport control works well and is also linked to product suspensions so the switch port is dropped on a server is payment is overdue. It's very much a custom module designed for our own specific needs, but if you get really stuck I can probably help out with something or give some guidance on how to put one together.
  11. Jafar Muhammed

    FORCE DESKTOP MODE ONLY

    But I request you not to restrict your customers in such a way. It will be an imposed disaster to your customers, and the UX would hit very severely. Of course, you may have a specific case, but still converting your mobile visitors to this kind of forced desktop view wouldn't fix the problem.
  12. Kian

    FORCE DESKTOP MODE ONLY

    Open templates/{YOUR_TEMPLATE}/header.tpl and look for the following meta tag: <meta name="viewport" content="width=device-width, initial-scale=1"> Replace it with: <meta name="viewport" content="{if $loggedin}width=1024{else}width=device-width, initial-scale=1{/if}"> This forces desktop view on mobile devices on all pages to loggedin users. Keep in mind that it doesn't work when resizing browser window on desktop. If you want that to work only with clientarea pages then use this code: <meta name="viewport" content="{if $loggedin AND $filename == 'clientarea'}width=1024{else}width=device-width, initial-scale=1{/if}">
  13. Kian

    remove navbar on cart page

    Given that I'm not a master of templates, I'd use this action hook: <?php add_hook('ClientAreaHeadOutput', 1, function($vars) { if ($vars['templatefile'] == 'viewcart') { $RemoveHeader = true; // "true" removes WHMCS header (logo, language picker, login/register, view cart button) $RemoveNavBar = true; // "true" removes WHMCS navbar (Home, Store, Announcements...) if ($RemoveHeader ? $output .= '<style>#header { display:none }</style>' : 0); if ($RemoveNavBar ? $output .= '<style>#main-menu { display:none }</style>' : 0); return $output; } }); add_hook('ClientAreaPageCart', 1, function($vars) { $output['DisplayMyCustomHeader'] = true; // "true" shows your custom header in PageCart return $output; }); Open templates/{YOUR_TEMPLATE}/header.tpl and look for the following statement: {if $templatefile == 'homepage'} Right befire it add the following code: {if $DisplayMyCustomHeader} <div class="home-shortcuts"> <div class="container"> <div class="row"> <div class="col-md-4 hidden-sm hidden-xs text-center"> <p class="lead">How can we help today?</p> </div> <div class="col-sm-12 col-md-8"> <ul> <li><a id="btnBuyADomain" href="domainchecker.php"><i class="fas fa-globe"></i><p>Buy A Domain <span>»</span></p></a></li> <li><a id="btnOrderHosting" href="cart.php"><i class="far fa-hdd"></i><p>Order Hosting <span>»</span></p></a></li> <li><a id="btnMakePayment" href="clientarea.php"><i class="fas fa-credit-card"></i><p>Make Payment <span>»</span></p></a></li> <li><a id="btnGetSupport" href="submitticket.php"><i class="far fa-envelope"></i><p>Get Support <span>»</span></p></a></li> </ul> </div> </div> </div> </div> {/if} And here is the result: Replace the content of {if $DisplayMyCustomHeader}{/if} with your header.
  14. on the topic of GearHeads going forward and if anyone wants my opinion (even if they don't, i'm going to give it!), in an ideal world, they should really be looking at having 4 GearHeads here - because if there were 4, then you have some redundancy built in so that if one goes missing (for whatever reason), the other 3 can cover the replies... at an absolute minimum, you need 2 if they are both active... having just 1 (whoever it is) is not viable long-term... of course, other fringe users can (and should) reply to threads too.. and personally, i'd keep replies from WHMCS support staff down to a minimum (except for things they have responsibility for. e.g bugs, announcements etc)... the more they post, the more this place can feel like an offshoot of the support dept... and what I liked about this place is that it wasn't like that! though in the absence of finding suitable gearheads (not everyone accepts the position when it's offered I understand lol!), staff involvement may be a necessary evil to cover the gaps. ... and of those 4 GH, they need to have a wide spread of knowledge between them - no point having 4 TPD, or four who know nothing about WHMCS coding - there needs to be a good mix so that the various question areas are covered. sadly, I can't think of four who would qualify.. can think of 3 (at their peak) who could, but then I draw a blank on the 4th... anyway, not my problem. ☺️
  15. thank you, my friend. think of it as a bonus feature of being a GearHead! 🙂 as I said previously, it's essential when posting serious lengthy code to be able to go back and edit it... otherwise, you'll end up with a thread of variations/fixes which gets confusing for everyone... and i've seen a few of them here over the years! and if you start a thread yourself, you can hide the entire thread too (even if others have replied) - the temptation is strong, so use it wisely.
  16. Welcome to WHMCS.Community astoundant! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  17. The blocks are responsive. At VW 800px they are arranged vertically and fullwidth. There are some tweaks being added to make the display more distinct, like defined color title bars. We'll probably implement WHMCS methods to make them sortable, AJAX reload, minimize and close.
  18. True. It posed a few challenges that were tabled while other models were being completed. The TinyMce plugin needs to make database connection to gather various data to create selection lists and make it developer friendly to allow a user to add their options. Currently it works to insert objects but it's not extendable. This will soon be implemented and added to the test site.
  19. The image manager will upload multiple images, however only 1 image can be added per banner entry. This is normal. The associated banner display module/widget will determine how many and in what order the the banner items are display in the front end
  20. Last week
  21. Exactly. @Remitur The problem is that WHMCS language is based on sessions so it doesn't matter what's the URL. The article will always use the default language which in your case is English. This hook should work. I tested on my dev system lazily. I'm gonna update if it doesn't work. It's commented. More information are provided below. <?php use WHMCS\Database\Capsule; use WHMCS\Config\Setting; add_hook('ClientAreaPageKnowledgebase', 1, function($vars) { /** * The way I'm getting $ArticleLanguage looks complicated but is necessary to match "Hello hello-hello" title with the rewritten URLs "Hello-hello-hello" * In fact there's no way to distinguish real dashes "-" from fake ones added by Friendly URLs of WHMCS * Keep in mind that I'm forced to use "raw" static method since WHERE statement doesn't support complex functions like REPLACE */ // Getting title from querty string $PageName = pathinfo($_GET['rp'])['filename']; // Retreiving the language of the currently displayed article by ID and title $ArticleLanguage = Capsule::select(Capsule::raw('SELECT language FROM tblknowledgebase WHERE parentid = "' . $vars['kbarticle']['id'] . '" AND REPLACE(title, "-", " ") = "' . str_replace('-', ' ', $PageName) . '" LIMIT 1'))[0]->language; // Retreiving the default language of WHMCS from tblconfiguration $DefaultLanguage = Setting::getValue('Language'); /** * This section is optional but needed if you want to protect yourself against blackhat SEO techniques (read post for more info) */ // Retreiving default language title $LegitURL = Capsule::select(Capsule::raw('SELECT REPLACE(title, " ", "-") AS title FROM tblknowledgebase WHERE id = "' . $vars['kbarticle']['id'] . '" LIMIT 1'))[0]->title; // If the URL currently in use is not 100% legit I force a redirect to the article in default langiage if ($LegitURL !== $PageName AND !$ArticleLanguage) { header('Location: index.php?rp=/knowledgebase/' . $vars['kbarticle']['id'] . '/' . $LegitURL . '.html'); die(); } /** * Here we set the right language depending on the URL */ // I check if the $ArticleLanguage is different from the language currently in use. I also make sure that $ArticleLanguage is different from $_SESSION['Language'] to avoid infinite loops if ($ArticleLanguage != $DefaultLanguage AND $ArticleLanguage != $_SESSION['Language']) { // Set language $_SESSION['Language'] = $ArticleLanguage; // Redirect visitor to current page to re-load the correct language header('Location: index.php?rp=' . $_GET['rp']); die(); } }); add_hook('ClientAreaHeadOutput', 1, function($vars) { /** * This guy adds canonical URL inside <head></head> tag so that Google doesn't penalize you (read post for more info) */ if ($vars['templatefile'] == 'knowledgebasearticle') { $PageName = pathinfo($_GET['rp'])['filename']; $CanonicalURL = Capsule::select(Capsule::raw('SELECT REPLACE(title, " ", "-") AS title FROM tblknowledgebase WHERE (parentid = "' . $vars['kbarticle']['id'] . '" OR id = "' . $vars['kbarticle']['id'] . '") AND REPLACE(title, "-", " ") = "' . str_replace('-', ' ', $PageName) . '" LIMIT 1'))[0]->title; return '<link rel="canonical" href="index.php?rp=/knowledgebase/' . $vars['kbarticle']['id'] . '/' . $CanonicalURL . '.html"/>'; } }); Even though we're now showing the right language to visitors, Google and all other Search Engines still hate us because we're providing duplicate contents. Their hate is so strong that they penalize us on SERP. Here is why: whmcs.com/index.php?rp=/knowledgebase/55/How-to-boil-water.html whmcs.com/index.php?rp=/knowledgebase/55/How-to-boil-vodka.html whmcs.com/index.php?rp=/knowledgebase/55/How-to-boil-rum.html whmcs.com/index.php?rp=/knowledgebase/55/How-to-boil-wine.html 4 URLs, same page and (duplicate) content. The only way to avoid penalties is that we let them know what's the unique URL by using rel="canonical" tag. The above hook adds it automatically where it is supposed to be (<head>here</head>). And if you are questioning why someone should use fake links, take a look at blackhat SEO techniques. One of your malicious competitor could publish some of those fake-links so that weeks later Google & co. penalize you for duplicate content. The above hook protects you from this technique forcing a redirect to the default article in case the URL in use is not the legit one.
  22. $invoiceid => $_SESSION['orderdetails']['invoiceID'], $serviceid => $_SESSION['orderdetails']['ServiceIDs'][0], found a couple things
  23. Hi, I want to align the billing cycle of a particular add-on item(s) that I will sell. There is a nextduedate established by a productA that I sold. I can retrieve that date $dueDate When I sell product B I want its nextduedate to be set to $dueDate, and its price to be prorated based on that date. Trying to change price with PreShoppingCartCheckout, and to change the renewal with the ShoppingCartCheckoutCompletePage hook. add_hook('PreShoppingCartCheckout', 1, function($vars) { $pro_rated_amount = 22.50; // do some math here to get amount $command = 'UpdateInvoice'; $postData = array( 'invoiceid' => $vars['invoiceid'], 'subtotal' => $pro_rated_amount, ); $results = localAPI($command, $postData); }); I think I could change the nextduedate IF i knew the serviceid, which unfortunately is not in $vars. add_hook( 'ShoppingCartCheckoutCompletePage', 1, function ( $vars ) { $next_due_date = nextduedate of productA; $command = 'UpdateClientProduct'; $postData = array( 'serviceid' => $serviceid, 'nextduedate' => date('Y-m-d', $next_due_date), ); $results = localAPI($command, $postData); }); Not sure if this is the best approach. Open to ideas, if you think this would work, then how would you get the serviceid needed in step2
  24. Hello, First of all, I am using WHMCS v7.7.1, and sorry if this was the wrong section of the community. Now, my problem is that when me or any customer tries to order a shared hosting package he/she fails. Why? Because when he/she/I come to the domain selection page, it gets stuck on "Verifying your domain selection..." - this occurs on all the browsers and all my users... Also Google Chrome's console doesn't give any errors or warnings regarding it. Here is an image showing the problem: I use WHMCS's default template (Six) and the Standard Cart order template. I tried re-uploading the templates files, and even the whole WHMCS files again but the same problem still occurs. So... I googled about this issue and I found that other people have the same problem and they solved it by changing the order template to "Modern"... This solution worked for me too but unfortunately I want to use the Standard Card template. Is it a bug for me only and some other people or what? If no, is there's any patches/hotfix for this issue? Any help would be appreciated. Thanks!
  25. Welcome to WHMCS.Community mariolatif! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  26. Naaah you didn't and anyway I don't care 🤣 No problem at all. I read your PM multiple times. You're amazing 👍 So that means I can edit my own posts. I didn't know that! It seems that I can also hide my own replies.
  27. Upon testing only 1 image is allowed to be uploaded. See http://tinyurl.com/y4s4ksxl
  28. This feature still has not been added to the test site. How do you expect users to test if you don't add it? http://tinyurl.com/y6dkrx34
  1. Load more activity
×

Important Information

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