Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. Just wanted to update that I'm using the Standard Cart order form and WHMCS version 8.1
  4. Hi Team, I know you can add smarty code in emails when you send then, but am I able to add smarty code in the HTML Header or Footer in mail configuration? For contact, I have a HTML header and want to add the client name to the header. This works in the main body of a response, but does not seem to work when smarty us placed in header or footer. Hope this makes sense! Thanks, Brad
  5. When I try to add anything new to my WHMCS like a client, a product or even a server the row is created on the database but not add the ID and then I can't edit. The id stay as 0. Any idea of how to solve this?
  6. Hello, Thanks for your feedback and also a big thank you for your quick response, because your code is working as hoped. A thousand thanks to you, really
  7. Update: I've updated my WHMCS and now it's working normally.
  8. <?php add_hook('ClientAdd', 1, function($vars) { $results = localAPI('AffiliateActivate', array('userid' => $vars['client_id'])); });
  9. are you suggesting me to remove this line ? $adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later <?php add_hook('ClientAdd', 1, function($vars) { $results = localAPI('AffiliateActivate', array('userid' => $vars['client_id']), $adminUsername); });
  10. yes - I just tried it without the adminUsername parts and it works fine in v8.0.4
  11. here reworked based on your suggestion, is it correct ? <?php add_hook('ClientAdd', 1, function($vars) { $adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later $results = localAPI('AffiliateActivate', array('userid' => $vars['client_id']), $adminUsername); });
  12. nearly - you should only need to change the add_hook line... add_hook('ClientAreaRegister', 1, function($vars) to... add_hook('ClientAdd', 1, function($vars) the other lines should remain the same - and you will need to use $vars['client_id'] rather than $vars['user_id'] because the AffiliateActivate API expects a client ID value to be passed to it and not a user ID.
  13. I have modified in this way , could work ? <?php add_hook('ClientAdd', 1, function($vars) { $adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later $results = localAPI('AffiliateActivate', array('userid' => $vars['user_id']), $adminUsername); });
  14. thanks Brian I confirm you are great as usual could you show me how modify to have both function working please ? in my site 99% of registration are via Cart thanks
  15. This is worrying. Looking forward to seeing what WHMCS has to say on this?
  16. I always aim for at least a 50% understanding rating when answering a question - i'm doing well so far. 🙂 you couldn't do it with CSS in a custom.css file - it's effect would be global.... hence why I mentioned CSS in a hook because then you can decide when and where it's applied. I think that's in the 50% I understood. 😎 what I had in mind yesterday was a simple hook along these lines... <?php # Remove cPanel Shortcuts From Products Page Hook # Written by brian! function remove_cpanel_panels_from_products_page_hook($vars) { $webdesignPIDs = array(2); if (in_array($vars['pid'],$webdesignPIDs)) { return array("systemStatus" => null); } } add_hook("ClientAreaProductDetailsPreModuleTemplate", 1, "remove_cpanel_panels_from_products_page_hook"); let's say for your two products, PID #1 is hosting, and PID#2 is webdesign - so $webdesignPIDs is an array containing a list of product IDS to be included in this webdesign category... for now, it's only #2. when a user visits the product details page, the hook will run - if the current product ID matches a value within the $webdesignPIDs array, then effectively the two quick panels below won't be included in the output... ... but if the current PID is not in the array, then the hook will do nothing and the user will be able to view the two panels above. the idea works because the above output is conditional on the value of that variable the hook returns - if you needed to remove other items on that page for these users, at that point, you're likely going to need CSS in hooks (which would use a different hook point and another method).
  17. assuming that you have created a Language Override for 'localeLanguage' (it's not a default language string)... $_LANG['localeLanguage'] = "https://www.google.com"; ... then you could do this in the hook... if ($vars['templatefile']=="homepage"){ $link = Lang::trans('localeLanguage'); if ($link != 'localeLanguage') { header("Location: " . $link); exit; } } and that should, assuming the language string exists, redirect users to the URL defined in the language overrides file for the current selected language.... if no string exists, then there is no redirection.
  18. that's one of Kian's hooks... https://github.com/Katamaze/WHMCS-Action-Hook-Factory/blob/master/hooks/NewClientsAsAffiliates.php I suppose in v8+, the results line of code should be... $results = localAPI('AffiliateActivate', array('userid' => $vars['client_id']), $adminUsername); ... though personally I wouldn't use the adminusername part. bear in mind that this hook only runs when a new client registers via the registration page - if they register via making an order,e.g via the cart, then this won't run... I would have thought using the ClientAdd hook point instead of ClientAreaRegister would cover both options.
  19. I would like to automatically set new customers as affiliates in WHMCS without needing them to do it manually. i'm trying to use this hook with whmcs 8.0.4 but some advice doesn't work? add_hook('ClientAreaRegister', 1, function($vars) { $adminUsername = 'admin'; // Optional for WHMCS 7.2 and later $results = localAPI('AffiliateActivate', array('userid' => $vars['userid']), $adminUsername); });
  20. Hello, I am coming to you following a problem using lang in a PHP file for the redirection of the index file. I don't know if the solution exists but I hope to have your help, you will find attached the part of the code : if ($vars['templatefile']=="homepage"){ $_SESSION['Language']; $link = $_LANG["localeLanguage"]; header("Location: " . $link); exit; } A big thank you in advance for your advice and for your help
  21. Hi, I would like to setup server location configuration in our WHMCS. I have 2 server, one in USA and another in Europe. So, when someone will buy web hosting we would like to show server location selection option. After selecting the server location, when the user will order and pay the invoice the account will be automatically created on the selected server. How can I do that? Thanks.
  22. I am using 8.0.4, and I am yet to upgrade to 8.1 I haven't received such messages from Stripe. However, I am unsure if WHMCS upgraded the PG module in 8.1, which caused this.
  23. Yesterday
  24. Hi, I'm developing a custom gateway payment module and it's already working for one time payments, but I'm wrapping my head around the best way to make it work with recurring subscriptions. I understand that on the first time the user chooses to subscribe, the payment gateway provides a unique subscriptionid (just like paypal or stripe do) and it's added to the tblhosting on the subscriptionid field, what I don't get is when the subscription renews, let's say after 1 month, how does the system handle this? How does it know which services/invoices need to renew or be marked as paid? Is there any tips that you can provide or a sample code/module that shows how recurring subscriptions are handled internally ? Any help will be very appreciated Thank you.
  25. Hi Brian, Thank you for the help. I'll give it a shot. Enjoy your weekend.
  26. Thank you or contacting me. Yes, I have received a reply and actively communicating with you. Just so you know that I am still getting 500 error when I visit that link.
  1. Load more activity
  • 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