Community Forums

Discuss, share and get help from our community of friendly WHMCS users

Login to Your Account
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    United States

    Default Modify single item of smarty array...


    Here's an example:

    _tpl_vars: Array
        [clientsstats] => Array
                [numpaidinvoices] => 0
                [paidinvoicesamount] => $0.00 USD
                [numdueinvoices] => 0
    So I wanted to modify/assign numdueinvoices, I'd use the following:

    $smarty->assign('clientsstats', array('numdueinvoices' => 123456));

    Issue with the above is that it will kill the other items of the array. I'd like to know how to modify a single item of said array without destroying the other items. Any ideas truly welcomed.
    Victor Lugo

  2. #2
    Join Date
    Oct 2009
    Aruba / Seychelles


    In your template file, you can add:
    PHP Code:
    {php}$this->_tpl_vars['clientsstats']['numdueinvoices'] = "value";{/php

Similar Threads

  1. Array ['configoptions']
    By X3non in forum Using WHMCS
    Replies: 1
    Last Post: 03-27-15, 09:59 PM
  2. Array in Domains
    By rjsorto in forum Using WHMCS
    Replies: 1
    Last Post: 06-09-09, 02:23 AM
  3. Step 2, accessing array
    By bear in forum Using WHMCS
    Replies: 2
    Last Post: 10-13-07, 02:44 PM
  4. (array.array) in step 4
    By r2w in forum Troubleshooting Issues
    Replies: 14
    Last Post: 02-05-07, 11:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts