Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 05/30/25 in Posts

  1. Hi all, In 8.13 a small improvement was made to the accounting of refunded mass-pay invoices. Prior to this the totals of mass-pay invoices were included in the overall income statistics, but now they are excluded as it's already accounted for by the original invoices.
    2 points
  2. But you did ask them, and not by just posting here? EDIT: This is a bit old now, but a fast search on this board found:
    2 points
  3. @DristiTechnologies Thank you so much for the analysis. This was more than I anticipated so it is very VERY much appreciated. 👍
    1 point
  4. There are few issues in the hook logic for applying credit and cancelling invoices: Incorrect array index usage in the loop You had: foreach ($invoiceData['invoices']['invoice'][0] as $invoice) This loops only over the first invoice. Use: foreach ($invoiceData['invoices']['invoice'] as $invoice) Incorrect object access You used: $invoiceId = $invoice->'id'; $creditamt = $invoice->'credit'; But $invoice is an associative array, not an object. Use: $invoiceId = $invoice['id']; $creditamt = $invoice['credit']; Incorrect variable name You had: if ($canceInvoice['result'] == 'success') Correct to: if ($cancelInvoice['result'] == 'success') Syntax error in else You had: else } Correct to: else {
    1 point
  5. Hi @ZeroMB, Thanks for that information. I've logged case #WHMCS-22693 with our developers in order to have this reviewed for future releases. Whilst I cannot provide an estimated time for completion for this, once we resolve cases and push features they are available at our change log, here: https://changelog.whmcs.com/ Thanks again for taking the time to report your findings.
    1 point
  6. oh wow! Thanks for clarifying that John. I must have been on HEAVY drugs the day I thought I saw a button there. Much appreciated that you clarified this for me.
    1 point
  7. Hi @Lairdswalker, The Tagline and Short Descriptions are displayed in the Cross-Selling messages later in the shopping cart flow. It isn't part of the product selection page. Here's the documentation for this feature: https://docs.whmcs.com/8-13/products/configuration-options/cross-selling-recommendations/
    1 point
  8. @ThemeMetro, We've published 8.13.1 with a fix for this case.
    1 point
  9. Hi. For convenience, I wanted to create a custom model for my module. I didn't like having to call Capsule every time I needed information that the module stored in the database. I want to share the code here in case other people didn't know how to do it but also to gather some feedback on this way of doing it. <?php namespace WHMCS\Module\Addon\MyModule; use WHMCS\Model\AbstractModel; /** * Convenience model for custom modules */ class MyModel extends AbstractModel { // Set the table that should be used for searching protected $table = 'mod_mymodule'; // We almost always have access to the service ID. Has to represent a column in the mod_mymodule table protected $primaryKey = 'serviceid'; } When using the model, we're able to do MyModule::find() or create a new instance using 'new MyModule()'.
    1 point
  10. by the time the hook is adding the code, the smarty will have already been processed - so adding smarty that you expect to do anything is not worth it... the way to think of it is to create the content of the replacement and pass that via the jQuery - don't think of it as the template contains {$tag1} and so I can just replace it with {$tag2}... what you do is replace the content of {$tag1} with a predefined replacement value - could be text, html etc.. and more importantly, assumes that you can locate the specific position of the content you want to replace in the hook - with WHMCS, that might not always, and sadly too often, be the case. replacing content with jQuery is not a magic bullet solution - at a push, i'd use it in a small limited way, but I wouldn't use it to make wholesale changes to a client area template, certainly not a cart template, unless it was a last resort. if you take your footer hook and replace the copyright content... <?php add_hook('ClientAreaHeaderOutput', 1, function($vars){ $footer = '<script>$(document).ready(function() { $("#footer .container").replaceWith("<div class=\"container\"><h2 style=\"color:red;\">New Copyright Footer</h2></div>"); });</script>'; return $footer; });
    1 point
×
×
  • 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