Jump to content


Honored Contributor
  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by brian!

  1. are you using standard whois for your lookups? https://docs.whmcs.com/Domain_Suggestions
  2. if you hadn't renamed the theme, the templates should have been updated... i've seen this error occur when a user has tried to remove the country dropdown field, but you seem not to be doing that.. if it didn't work on Edge, i've had suggested reinstalling/reuploading... are there any plugins/extensions with Chrome that could be causing this that aren't available to Edge ?
  3. brian!

    Check email opt-in status for client

    multiple ways - made easier by the fact that you know the client will be logged in - i'll use some email verification hooks as examples... query the database....ignore returning the array part as that won't be relevant for a homepage panels hook, but notice the two lines of code required to query the database to get this boolean value (0 or 1)... $client = Menu::context("client"); $emailoptin = Capsule::table('tblclients')->where('id',$client->id)->value('marketing_emails_opt_in'); remember to declare that you're using capsule too - otherwise, it won't work. use models with the class docs... $client = Menu::context("client"); $emailoptin = $client->marketingEmailsOptIn; ... should return true or false. the marketing value will exist inside the $clientsdetails array in the clientareahome template, which for most hooks you could access via $vars, but with HPP hooks, you could also access by declaring $smarty as a global - check out the first three lines of the hook below where i'm using variables from the template... generally, i'd only use this if you couldn't get the info easily from querying the database or the model - but it can be a useful quick solution when needed. you could use the API to get the value, e.g GetClientsDetails, but that would be supreme overkill if you only need one value from the returned array. once you have the value, then it can be used in your IF statements.
  4. brian!

    I propose a tax-free world

    is AfterConfigOptionsUpgrade too late for your needs, or could that be used ?
  5. i've previously written code using this hook to block specific words from being searched for... of course, the hook wouldn't prevent suggested domains from appearing.
  6. ShoppingCartValidateDomain - the user will be in the cart when searching for domains and the hook can return an array of error message(s).
  7. oh if the email address was valid, then I would suspect what you saw to be expected behaviour as the fields you list are just text fields with no formatting validation. - a user could enter those details in older versions, e.g v5.3, if they wanted to without causing an error. i've never been a big fan of enabling registration without ordering as for most circumstances it seems irrelevant - though some WHMCS users prefer registration without ordering as it suits their business model.
  8. i'm not aware of any additional checks on the email address that occur during registration - other than those specified in the template.
  9. that's not an issue that I see when using the same version of Chrome - with 7.7 or 7.8.3 - so I doubt that it's a generic issue with Chrome or WHMCS, but probably your install. have you modified the templates in any way ??
  10. what I would do first is make these fields optional in setup -> general settings -> other -> optional client profile fields... that will make them optional on both the registration and checkout pages... then I would use a hook to make these specific fields required at checkout.. an example of which I have posted previously in the thread below... in that example, the companyname and taxid fields are now required at checkout - but would still be optional during registration. one thing that I seem to have forgotten to mention in that solution is the requirement to create Language Overrides for the error messages (in each language used on your site) - or you could hardocde the error in a specific language in the hook. $_LANG['clientareaerrorcompanyname'] = "You did not enter a company name";
  11. can't you use a domain that you own, possibly with a catch all mailbox, for these fake emails ? there are addon(s) available in marketplace where your clients can use either a username or email address to login - it seems to just use a customfield for the username - that might be an option for you as then your clients won't need to have an email address, and you won't need to assign them a fake one. there's an archived 6-year old feature request for this with 26 votes, so I doubt WHMCS will be adding this any time soon.
  12. as the registration form template uses HTML5 email validation (type=email), under most circumstances the form should validate the format of the email address and throw an error if it's not correct... if these spammers were using a browser that doesn't support these HTML5 input fields, they will be treated as normal input fields and text could be added to them with no email format validation occurring. enabling Google CAPTCHA (instead of WHMCS captcha) might be worth trying (though GR can be bypassed too!) - but ultimately if this becomes an issue, you might need to think about using additional validation to the form, e.g JavaScript validation or checks before the client is added to WHMCS).
  13. brian!

    How to display this info

    it depends where on the page you want to output this content - if you want to display it above the homepage panels, then you could use a ClientAreaHomepage hook and that would output the html between the MarketConnect banner (if you sell MC products) and the panels... <?php add_hook('ClientAreaHomepage', 1, function($vars) { return "Hello World"; }); if you don't offer MC products, then this output will appear between the knowledgebase search form and the panels - note that the hook can include html in it's output. however, I assumed that you would want to add the output to the bottom of the page, after the panels - you can't really use hooks to specify where on a page the output will be shown, the template will be designed to display the output of these hooks in a specific place... the only realistic workaround to that would be a jQuery hook, but then you would have to specify it display after a specific HTML tag, which may not be possible depending on where the output is going to be. without knowing your site, template and where exactly the output is supposed to be, adding HTML to the template is the simplest solution.
  14. brian!

    Spam orders

    there would be various options available if you want to go down that route... either could be expanded to suit your needs - there are commercial alternatives, but nothing that couldn't be easily be reproduced from the above solutions (those solutions above were published first! 😉)
  15. the solution (or at least the starting point) is already out there! 🙂 looking at David's code, one obvious bug is that the uri filenames (the links in each child) should ideally end in .php (otherwise it might generate a site error) - unless you're redirecting these links outside of WHMCS. only the first three sidebar children have been created in the above hook, but hopefully you can see how simple it is to add new children for downloads, open ticket etc. 🙂
  16. brian!

    Redirect cart.php to main website!!

    two words - Friendly URLs 😲😲 first introduced into the client area a few years back, and recently being utilised in the admin area too - I wouldn't waste my time trying to write htaccess to work with/around it, i'd probably fall back to using a hook. to ensure anyone just going to cart.php directly (e.g the opening products page) gets redirected elsewhere, you could use the hook below (it's just a variation on a hook that i've posted previously)... <?php # Redirect Cart Visitors Hook for SteelSignature # Written by brian! function redirect_cart_vistors($vars) { if ($vars['templatefile'] === 'products'){ header("Location: clientarea.php"); exit; } } add_hook("ClientAreaPageCart", 1, "redirect_cart_vistors"); ?> visitors to cart.php, or cart.php?gid=1 etc will be redirected to clientarea.php (you could change that to another page or site URL if required, e.g index.php or https://google.com etc)... visitors to the domain registration / transfer / MarketConnect sales pages / viewcart and checkout should be unaffected by the hook - as will those using direct URL links to specific products. this hook could be expanded to include other cart pages (or beyond), but whether that's necessary depends on how protective you want to be with direct access to the cart.
  17. brian!

    Which hook should I use?

    it might be helpful for you to take a look at the free WHMCS Softaculous addon which can also be used to install WordPress - the addon code isn't encrypted, so it should be useful for you to examine. it shouldn't be ClientAdd as that just adds a client to the WHMCS database, but the user should already have an account in WHMCS, or will automatically after ordering, so adding them should be unnecessary... the Softaculous addon uses AfterModuleCreate which should be a clue as to which one to use! 🙂
  18. brian!

    Subscribe Button Question

    the answer that I gave in the post below is still relevant to your question... the mass mail and email marketer features of WHMCS can only send emails to existing clients, so if you were just interested in an email subscription list, it would probably be simpler to use MailChimp etc. an existing client could log into the client area and update their mailing list setting if that's what you want to do.
  19. well done for taking the time to post this - the v7.9 beta 1 is still using the old knob file, so hopefully later beta releases will include the updated version of knob to fix this bug. I can confirm updating that file in v7.8.3 does fix the percentage display issue.
  20. that sidebars conditionality will be determined in an encrypted file somewhere, so the solution often suggested is a secondary sidebar hook that recreates that entire sidebar.
  21. so in other words, some fields would be optional/removed on register.php, but required at checkout ? not from admin settings, but it could be achieved with hooks, possibly even template edits - but often it's just simpler to disable registration and leave it until ordering before the need to collect client info (unless there is some specific need on your site for them to register first before ordering?).
  22. i'm not testing the v7.9 betas - i'll probably wait until the New Year when it gets a full release... there's nothing in the changelog, so I assume there are no changes with regards to your issue. as I said, I wouldn't expect to see this in v7.9 - it's possible a future 7.9 beta release might include it, but there's no way to know for sure. thinking about the situation again, it's possible that a combination of hooks might allow you to change the pricing whilst ignoring the configurable option pricing - though there are no specific promo code hooks, so possibly you might need to set it at 0% discount in the promo and let the hooks change the price... it should work, but this would need thorough testing though.
  23. brian!

    How to display this info

    if you already have the html code that produces that output, have you tried copy&pasting it into clientareahome.tpl ?? you could add it to the bottom of the file, and then move it to suit your needs.
  24. instead of trying to get it to sync, I would suggest updating its whmcs record manually from the admin area -> client profile -> domain tab... set the client & domain to active, add the correct expiry and next due dates and that's all that should be needed. it's possible that this domain is assigned to a registrar that doesn't support domain synchronisation, and so will never synchronise through WHMCS - you could check the registrars page to see if it supports syncing.
  25. if the $800 is from multiple clients, and predates your existing records/years, then another option would be to create another fake array in the budget report of yours... 😉 Kian's idea is perfectly viable, but if it's multiple clients, especially if none of those clients don't already exist, then it would be an option to make a dummy client and just add the transaction to that account.

Important Information

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