Nats display reward category
From TMM Wiki
Jump to navigationJump to searchApplies to NATS 4.0.25 and greater.
nats_display_reward_category
Displays a list of a every available reward in a single rewards category.
Alias: display_reward_category
Parameters
(Required parameters in bold)
Parameter | Description | Possible Values | Default Value | Example |
---|---|---|---|---|
tpl | Template used to display output | Any valid template | The template, function_display_reward_category | tpl="mytemplate" |
catid | The rewards category ID number | Any valid rewards category ID number | No default. You must provide a valid category ID number. | catid="123" |
assign_prefix | Prefix output variables with this word. (Click link for details) | Any valid Smarty variable name | None. (No prefix is used) | assign_prefix="myvar" |
data_only | Set variables but don't display the template | 1 | None. The template is displayed. | data_only=1 |
Output
A list of every available reward in a single rewards category. Output is also stored in a single-dimensional array, $rewards.
Notes
Another template function, nats_display_reward_purchases, also uses the array $rewards. If you call both nats_display_reward_purchases and nats_display_reward_category in the same template, the array $rewards will contain the output of last function run above it in the template.
See Also
- nats_display_reward_purchases -- displays a list of rewards an affiliate has purchased; also uses an array named $rewards.