Results 1 to 2 of 2

Thread: Modify single item of smarty array...

  1. #1
    Join Date
    Mar 2009
    Location
    United States
    Posts
    7

    Default Modify single item of smarty array...

    Hi,

    Here's an example:

    Code:
    _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
    Location
    Aruba / Seychelles
    Posts
    410

    Default

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

Similar Threads

  1. What is the value for Log ID in config array
    By Samdeniyi in forum Customisation and Integration Questions
    Replies: 0
    Last Post: 07-02-13, 12:40 PM
  2. Invoice Items Array
    By Inetbiz in forum Technical Issues and Questions
    Replies: 0
    Last Post: 07-30-11, 04:52 PM
  3. Array in Domains
    By rjsorto in forum Technical Issues and Questions
    Replies: 1
    Last Post: 06-09-09, 02:23 AM
iron-diatonic