Difference between revisions of "Nats get payment breakdown"
From TMM Wiki
Jump to navigationJump to searchLine 38: | Line 38: | ||
|- | |- | ||
| assign_prefix | | assign_prefix | ||
− | | the string to prefix output variables with | + | | the string to prefix output Smarty variables with |
| any string | | any string | ||
| <blank> | | <blank> | ||
Line 45: | Line 45: | ||
== Output == | == Output == | ||
− | A | + | A breakdown of the provided payment ids in the <tt>{$data}</tt> Smarty variable given the requested breakdown. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Example == | == Example == |
Revision as of 22:30, 26 June 2019
nats_get_payment_breakdown
Provides a breakdown for the given list of payments {$data} Smarty variable.
Alias: get_payment_breakdown
Parameters
(Required parameters in bold)
Parameter | Description | Possible Values | Default Value | Example |
---|---|---|---|---|
paymentids | the list of payment ids to get a breakdown for | any valid payment id values | <blank> | paymentids="1,2,3" |
breakdown | the breakdown you want | siteid, programid, site_group_id | siteid | breakdown="programid" |
no_details_group_name | the name for the group of payments that are not associated with transactions | any string | *SPECIAL PAYMENTS* | no_details_group_name="Other" |
assign_prefix | the string to prefix output Smarty variables with | any string | <blank> | assign_prefix="output_" |
Output
A breakdown of the provided payment ids in the {$data} Smarty variable given the requested breakdown.
Example
For example, to add the price of each join option next to its description you can edit the join page template as follows.
Replace the line below:
{html_options options=$join_options selected=$vars.optionid}
with:
{list_options site=$site} {foreach from=$join_options key=k item=v} <option>{$v} - ${$option_details[$k].initial}</option> {*shows the description of the join_option followed by a '-', followed by the initial price of the join option*} {/foreach}
Instead of displaying "Our most popular service" in the list box, this will display "Our most popular service - $10".