Jump to content

sufi

Level 2 Member
  • Content count

    52
  • Joined

  • Last visited

  • Days Won

    2

sufi last won the day on February 17

sufi had the most liked content!

Community Reputation

12 Good

About sufi

  • Rank
    Level 2 Member
  1. sufi

    WordPress + WHMCS

    Thanks for the complements 🙂
  2. 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.
  3. 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.
  4. 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; }
  5. Thanks for this. I have used global $CONFIG to get the system url.
  6. Title says it all. How do I get system url in a variable inside a module I am developing?
  7. 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.
  8. How do I add 2CO recurring payment (subscribed without WHMCS) to WHMCS invoice?
  9. Thanks. I was checking if there was any builtin function i can use. But, yes database query also solved my problem.
  10. 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?
  11. Thanks. I have already sorted it out with AdminClientProfileTabFields.
  12. 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?
  13. 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?
  14. 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.
  15. Thanks. I can certainly use the calculation part to manually add the late fee. But problem is with the applied credit. There is a variable to get the available credit balance {$client_credit}. If there are multiple unpaid invoices, credit balance automatically applies to the first generated invoice. It will be great if, by somehow, I can get the due invoice amount associated with the service.
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines