Jump to content


Level 2 Member
  • Content count

  • Joined

  • Last visited

  • Days Won


sufi last won the day on February 17

sufi had the most liked content!

Community Reputation

14 Good

About sufi

  • Rank
    Level 2 Member
  1. sufi

    WordPress + WHMCS

    Thanks for the complements. I have modified only header, footer and one support ticket tpl file of the "Six" template. Everything else was done with hooks and custom css. It makes upgrade process very easy, as I only have to check (and possibly modify) 3 tpl files!
  2. sufi

    WordPress + WHMCS

    Thanks for the complements 🙂
  3. sufi

    WordPress + WHMCS

    Hello Good People, Main site was built with WordPress, using a premium theme, with a heavy modification in design. WHMCS part was done using SIX as base, with mostly css modification, some html modification (mostly header and footer). Front end: https://dctit.host/ WHMCS: https://dctit.host/shop/ View Cart page: https://dctit.host/shop/cart.php?a=view Will appreciate your feedback. Kindly let me know your thoughts. Thanks.
  4. Hello, If automated credit use is on, when an invoice is generated, it adds available credit to the invoice. But, for some reason, if that invoice is cancelled, those applied credit amount doesn't get removed automatically. It's really hard to manually remove them one by one. What is the solution in this scenario? Thanks.
  5. Hello, I am trying to override smarty template from `ClientAreaPage` hook. But, when I fetch custom template, it keeps loading and loading until memory runs out, and gives a 500 internal server error! Can't seem to figure it out. Any help will be appreciable. This is what I am doing: add_hook('ClientAreaPage', 1, function( $vars ) { global $smarty; $version = $GLOBALS['CONFIG']['Version']; //tried with "post" and "output" filter - without any luck. $smarty->registerFilter('pre','template_override_output_filter'); }); function template_override_output_filter($tpl_output, Smarty_Internal_Template $template) { global $smarty; $template_file_path = $template->_current_file; //getting filename $parts = explode('/', $template_file_path); $template_file_name = array_pop($parts); $custom_directory = 'custom'; $new_file = ROOTDIR . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $custom_directory . DIRECTORY_SEPARATOR . $template_file_name; if (!file_exists($new_file)) { return $tpl_output; } $tpl_output = $smarty->fetch($new_file); return $tpl_output; }
  6. Thanks for this. I have used global $CONFIG to get the system url.
  7. Title says it all. How do I get system url in a variable inside a module I am developing?
  8. Thanks Chris, for your recommendation. But is there any other way, apart from setting up new subscription? I would like to avoid that if possible.
  9. How do I add 2CO recurring payment (subscribed without WHMCS) to WHMCS invoice?
  10. Thanks. I was checking if there was any builtin function i can use. But, yes database query also solved my problem.
  11. I need to check for valid invoice id from an array of ids. Problem with checkCbInvoiceID is, it kills the script (die()) once it find one invalid invoice id. So I can't run it through the array. Is there any alternative function to check invoice id, which will not kill the script?
  12. Thanks. I have already sorted it out with AdminClientProfileTabFields.
  13. Thanks for making it clear to me. It now makes sense. The problem I am facing is actually when user data is updated from admin panel. If some admin updates (for example) email and password from the profile tab, then it triggers ClientChangePassword and ClientEdit hooks. ClientEdit hooks keep the old email, which I need to verify the password change. But unfortunately when ClientChangePassword triggers, it only returns userid and password string. Queering from DB, I can get the new email, but I need old email inside the function of ClientChangePassword. Do you have any clue/suggestion on how can I get that?
  14. I am trying to run ClientChangePassword hook after ClientEdit hook. BUt no matter what priority I set for them, ClientChangePassword always runs before ClientEdit! How to overcome this? Can anyone please help?
  15. Thanks again Brian. Should I hook to this: http://docs.whmcs.com/Hooks:EmailTplMergeFields ? I am certainly not much familiar with WHMCS hooks and functions. Do you have any example of how they work? I can easily grab the value from db. I have looked in to tblinvoiceitems, and it is (type = 'LateFee' ). However, I think tblinvoices is good enough for me, as I can get applied credit as well as total due after calculating all late fees and applied credits.

Important Information

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