Difference between revisions of "NATS4 Mailer Template Variables"

From TMM Wiki
Jump to navigationJump to search
 
(30 intermediate revisions by 13 users not shown)
Line 3: Line 3:
 
}}
 
}}
  
You can use the following variables, grouped by their arrays, on templates
+
You can use the following variables, grouped by their arrays, on templates in the [[NATS4 Skins and Templates Admin|Skins and Templates Admin]] and [[Ct#Site|Site]] [[Ct#Template|Templates]] that get mailed to [[Ct#Affiliate|affiliates]] and [[Ct#Member|members]]. For example, ''mail_affiliate_on_member_joined'' or ''mail_member_change''. When testing your changes, make sure that you customize both the regular e-mail [[Ct#Template|template]] and the _html e-mail [[Ct#Template|template]]. Unless both forms of the [[Ct#Template|template]] are properly configured, your e-mails will not be sent.
in the [[Skins & Templates Admin]] and [[Site Templates]] that get
 
mailed to affiliates. For example, ''mail_affiliate_on_member_joined'' or
 
''mail_member_change''.
 
  
 
== member ==
 
== member ==
The member array holds the member's information.
+
The following variables hold [[Ct#Member|members]]' information. These are available in ''mail_member_'', ''mail_owner_'', and ''mail affiliate_on_member_'':
  
* {$member.memberid}
+
* {$member.loginid} - The affiliate's ID that member was referred from in NATS
* {$member.firstname}
+
* {$member.status} - the status of the member.
* {$member.lastname}
+
**0: Never Joined
* {$member.address1}
+
**1: Active
* {$member.address2}
+
**2: Expired
* {$member.zip}
+
 
* {$member.city}
+
* {$member.trial} - whether they are on trial or not.
* {$member.country}
+
**0: not trial
* {$member.state}
+
**1: trial
* {$member.shipping_firstname}
+
 
* {$member.shipping_lastname}
+
* {$member.joined} - when they joined
* {$member.shipping_address1}
+
* {$member.expired} - when they have completely expired (set to 0 until completely expired)
* {$member.shipping_address2}
+
* {$member.siteid} - site id member signed up under
* {$member.shipping_zip}
+
* {$member.optionid} - join option id member signed up under
* {$member.shipping_city}
+
* {$member.billerid} - biller id member signed up under
* {$member.shipping_country}
+
* {$member.rebills} - the time the member will rebill next
* {$member.shipping_state}
+
* {$member.custom1} - the custom field in the members admin
* {$member.phone}
 
* {$member.xsell_success}
 
* {$member.xsell_message}
 
* {$member.custom1}
 
 
* {$member.custom2}
 
* {$member.custom2}
 
* {$member.custom3}
 
* {$member.custom3}
 
* {$member.custom4}
 
* {$member.custom4}
 
* {$member.custom5}
 
* {$member.custom5}
* {$member.last_modified}
+
* {$member.transaction} - Array of transaction details
* {$member.memberid}
+
* {$member.transaction.transaction_id} -  transaction ID under the subscription in NATS
* {$member.identid}
+
* {$member.transaction.biller_transid} -  Biller transaction ID reported to NATS with biller short name prepended
* {$member.loginid}
+
* {$member.transaction.biller_time} - time the transaction occured on biller's side
* {$member.networkid}
+
* {$member.transaction.server_time} - time the transaction was recorded in NATS
* {$member.refurl_lookup_id}
+
* {$member.transaction.biller_transid} - transaction ID on the biller's side
* {$member.status}
+
* {$member.transaction.total_transaction_payout} - payout to the affiliate on this transaction
* {$member.trial}
+
* {$member.transaction.amount} - calculated amount of transaction in NATS
* {$member.joined}
+
* {$member.transaction.biller_amount} - amount of transaction reported by biller
* {$member.expired}
+
* {$member.transaction.biller_currency} - currency of biller_amount reported by biller
* {$member.last_login}
+
 
* {$member.stamp}
+
 
* {$member.siteid}
+
'''The following variables hold additional [[Ct#Member|members]]' information but are only available in ''mail_member_'' and ''mail_owner_'':'''
* {$member.username}
+
* {$member.memberid} - the id of the member
* {$member.password}
+
* {$member.firstname} - first name of the member
* {$member.cryptpass}
+
* {$member.lastname} - last name of the member
* {$member.ip}
+
* {$member.address1} - first line of address
* {$member.email}
+
* {$member.address2} - second line of address
* {$member.session}
+
* {$member.zip} - the zip code
* {$member.mailok}
+
* {$member.city} - city of address
 +
* {$member.country} - country
 +
* {$member.state} - state
 +
* {$member.member_subscription_id} - subscription ID of member in NATS
 +
* {$member.shipping_firstname} - shipping first name
 +
* {$member.shipping_lastname} - shipping last name
 +
* {$member.shipping_address1} - shipping address 1
 +
* {$member.shipping_address2} - shipping address 2
 +
* {$member.shipping_zip} - shipping zip code
 +
* {$member.shipping_city} - shipping city
 +
* {$member.shipping_country} - shipping country
 +
* {$member.shipping_state} - shipping state
 +
* {$member.phone} - member's phone number
 +
* {$member.xsell_success} - <!-- if the xsell is successful//This is commented out due to ticket 1310-10901-0088 --> Do Not Use
 +
* {$member.xsell_message} - the xsell message sent
 +
* {$member.last_modified} - last time the member was modified
 +
* {$member.identid} - a unique number that contains information about the campaignid, tourid, siteid, optionid etc.
 +
* {$member.refurl_lookup_id} An id that identifies the URL that referred the member.
 +
** Note: This only retrieves the ID number and not the referring URL. To get the URL, use the [[Ct#Template|template]] function ''nats_get_refurl''.
 +
**For example: <code>{nats_get_refurl refid=$member.refurl_lookup_id}</code> to set the function, then use the Smarty function: <code>{$nats_refurl}</code> to display it.
 +
* {$member.last_login} - last time they logged in
 +
* {$member.stamp} - last time member was updated
 +
* {$member.username} - the member's username
 +
* {$member.cryptpass} - the crypted password
 +
* {$member.ip} - the ip they used to sign up
 +
* {$member.email} - the email they signed up with
 +
* {$member.session} - session id of the member in NATS
 +
* {$member.mailok} - if the member opted in for emails. 1 if yes, 0 for no
 
* {$member.flat_price}
 
* {$member.flat_price}
* {$member.first_login}
+
* {$member.first_login} - when they first logged in.
* {$member.third_party_partner_id}
+
* {$member.third_party_partner_id} - the id of the third party
* {$member.cascadeid}
+
* {$member.cascadeid} - The id for the cascade that the member used to sign up.
* {$member.cascade_item_id}
+
* {$member.cascade_item_id} - The id for the biller in the cascade that the member used to sign up.
* {$member.token}
+
* {$member.token} - The hash that each member of a token site uses to authenticate.
* {$member.original_username}
+
* {$member.original_username} The member's original username.
* {$member.renamed}
+
* {$member.renamed} - The date when the member's username was changed.
 +
 
 +
== affiliate ==
 +
 
 +
The following variables hold [[Ct#Affiliate|affiliates]]' information, for affiliates that '''sign up''' to your affiliate program. These variables can be used on the mailer [[Ct#Template|templates]] ''mail_owner_affiliate_signup'' and ''mail_affiliate_on_signup''. All of the stored [[Ct#Affiliate|affiliate]] information can be found in the $affiliate array.
 +
 
 +
* {$affiliate.nats}
 +
* {$affiliate.company}
 +
* {$affiliate.url}
 +
* {$affiliate.firstname}
 +
* {$affiliate.lastname}
 +
* {$affiliate.email}
 +
* {$affiliate.nostore_verify_email}
 +
* {$affiliate.mailok}
 +
* {$affiliate.icq}
 +
* {$affiliate.aim}
 +
* {$affiliate.msn}
 +
* {$affiliate.username}
 +
* {$affiliate.password}
 +
* {$affiliate.nostore_verify_password}
 +
* {$affiliate.address1}
 +
* {$affiliate.address2}
 +
* {$affiliate.city}
 +
* {$affiliate.state}
 +
* {$affiliate.zip_code}
 +
* {$affiliate.country}
 +
* {$affiliate.tax_id_or_ssn}
 +
* {$affiliate.payvia}
 +
* {$affiliate.minimum_payout}
 +
* {$affiliate.verify}
  
 
== details.loginid ==
 
== details.loginid ==
The details.login array holds the NATS information about the reseller.
 
  
* {$details.loginid.loginid}
+
The details.login array holds the [[NATS]] information about an [[Ct#Affiliate|affiliate]] who referred a specific member. These variables can be used on the mailer [[Ct#Template|templates]] beginning with the ''mail_member_'', ''mail_owner_'', and ''mail_affiliate_'' prefixes.
* {$details.loginid.username}
+
 
* {$details.loginid.password}
+
* {$details.loginid.loginid} - affiliate's ID in NATS
* {$details.loginid.deleted}
+
* {$details.loginid.username} - affiliate's username
* {$details.loginid.type}
+
* {$details.loginid.password} - affiliate's password
* {$details.loginid.skinid}
+
* {$details.loginid.deleted} - if the affiliate is deleted or not.
* {$details.loginid.payvia_type_id}
+
**0 - not deleted
* {$details.loginid.status}
+
**1 - deleted
* {$details.loginid.pass_hash}
+
 
* {$details.loginid.join_date}
+
* {$details.loginid.type} - ID access level of the affiliate
* {$details.loginid.inhouse}
+
* {$details.loginid.skinid} - ID of the skin the affiliate is using
* {$details.loginid.loginid}
+
* {$details.loginid.payvia_type_id} - ID of the payvia method affiliate is using
* {$details.loginid.firstname}
+
* {$details.loginid.status} - status of the affiliate
* {$details.loginid.lastname}
+
**0: Active
* {$details.loginid.email}
+
**1: Disabled
 +
**2: Banned
 +
**3: Wait on Verify
 +
**4: Pending
 +
**5: Denied
 +
 
 +
* {$details.loginid.pass_hash} - password hash
 +
* {$details.loginid.join_date} - when the affiliate joined
 +
* {$details.loginid.inhouse} - if the affiliate is an inhouse account or not
 +
**0 - not inhouse
 +
**1 - inhouse
 +
 
 +
* {$details.loginid.firstname} - affiliate's first name
 +
* {$details.loginid.lastname} - affiliate's last name
 +
* {$details.loginid.email} - affiliate's email
 
* {$details.loginid.date_posted}
 
* {$details.loginid.date_posted}
* {$details.loginid.last_login}
+
* {$details.loginid.last_login} - when the affiliate last logged in
* {$details.loginid.last_login_ip}
+
* {$details.loginid.last_login_ip} - the IP the affiliate last logged in from
* {$details.loginid.reviewed}
+
* {$details.loginid.reviewed} - if the affiliate is manually marked as reviewed
* {$details.loginid.minimum_payout}
+
**0 - not reviewed
 +
**1 - reviewed
 +
* {$details.loginid.minimum_payout} - the minimum payout the affiliate set for their payvia type
 
* {$details.loginid.bonus}
 
* {$details.loginid.bonus}
 
* {$details.loginid.verify}
 
* {$details.loginid.verify}
Line 94: Line 158:
 
* {$details.loginid.startpage}
 
* {$details.loginid.startpage}
 
* {$details.loginid.rep_baseline}
 
* {$details.loginid.rep_baseline}
* {$details.loginid.company}
+
* {$details.loginid.company} - the company of the affiliate
* {$details.loginid.url}
+
* {$details.loginid.url} - the url of the affiliate
* {$details.loginid.tel}
+
* {$details.loginid.tel} - the telephone number of the affiliate
* {$details.loginid.icq}
+
* {$details.loginid.icq} - ICQ number of affiliate
* {$details.loginid.aim}
+
* {$details.loginid.aim} - AIM username of affiliate
* {$details.loginid.msn}
+
* {$details.loginid.msn} - MSN username of affiliate
* {$details.loginid.address1}
+
* {$details.loginid.address1} - address of affiliate
 
* {$details.loginid.address2}
 
* {$details.loginid.address2}
* {$details.loginid.city}
+
* {$details.loginid.city} - city of affiliate
* {$details.loginid.state}
+
* {$details.loginid.state} - state of affiliate
* {$details.loginid.country}
+
* {$details.loginid.country} - country of affiliate
* {$details.loginid.zip_code}
+
* {$details.loginid.zip_code} - zip code of affiliate
* {$details.loginid.tax_id_or_ssn}
+
* {$details.loginid.tax_id_or_ssn} - tax ID or SSN of the affiliate
 
* {$details.loginid.invoicer}
 
* {$details.loginid.invoicer}
* {$details.loginid.req_docs}
+
* {$details.loginid.req_docs} - if affiliate is marked as having the required documentation
* {$details.loginid.w9}
+
* {$details.loginid.w9} - if the affiliate has a W9 uploaded or not
* {$details.loginid.mailok}
+
**0 - no W9
 +
**1 - has W9
 +
* {$details.loginid.mailok} - if affiliate opted in for emails or not
 +
**0 - not opted in
 +
**1 - opted in
 
* {$details.loginid.trust_level}
 
* {$details.loginid.trust_level}
 
* {$details.loginid.new_notification}
 
* {$details.loginid.new_notification}
* {$details.loginid.flag1}
 
* {$details.loginid.flag2}
 
* {$details.loginid.flag3}
 
* {$details.loginid.flag4}
 
* {$details.loginid.flag5}
 
* {$details.loginid.select1}
 
* {$details.loginid.select2}
 
* {$details.loginid.select3}
 
* {$details.loginid.select4}
 
* {$details.loginid.select5}
 
 
* {$details.loginid.default_campaign}
 
* {$details.loginid.default_campaign}
 
* {$details.loginid.default_program}
 
* {$details.loginid.default_program}
Line 128: Line 186:
 
* {$details.loginid.pv_instant}
 
* {$details.loginid.pv_instant}
 
* {$details.loginid.payout_approval}
 
* {$details.loginid.payout_approval}
* {$details.loginid.notify_password}
+
 
* {$details.loginid.notify_payvia}
+
 
* {$details.loginid.notify_payvia_info}
+
== biller ==
* {$details.loginid.notify_defaults}
+
The details.billerid array holds information about the [[Ct#Biller|biller]] the
* {$details.loginid.notify_details}
+
[[Ct#Member|member]] signed up under. These variables can be used on the mailer [[Ct#Template|templates]] beginning with the ''mail_member_'', ''mail_owner_'', and ''mail_affiliate_on_member_'' prefixes.
* {$details.loginid.notify_settings}
+
 
* {$details.loginid.notify_member_change}
+
* {$details.billerid.billerid} - ID of the biller in NATS
* {$details.loginid.notify_member_voided}
+
* {$details.billerid.networkid}
* {$details.loginid.notify_member_chargeback}
+
* {$details.billerid.biller} - the name of the biller
* {$details.loginid.notify_member_credited}
+
* {$details.billerid.last_poll}
* {$details.loginid.notify_member_insufficient}
+
* {$details.billerid.form_method}
* {$details.loginid.notify_member_cancelled}
+
* {$details.billerid.deleted}
* {$details.loginid.notify_member_rebilled}
+
 
* {$details.loginid.notify_member_joined}
 
* {$details.loginid.verify_details}
 
* {$details.loginid.verify_settings}
 
* {$details.loginid.verify_defaults}
 
* {$details.loginid.verify_payvia}
 
* {$details.loginid.verify_payvia_info}
 
* {$details.loginid.email_promotional}
 
* {$details.loginid.email_on_notify}
 
* {$details.loginid.email_on_member_change}
 
* {$details.loginid.email_on_member_voided}
 
* {$details.loginid.email_on_member_chargeback}
 
* {$details.loginid.email_on_member_credited}
 
* {$details.loginid.email_on_member_insufficient}
 
* {$details.loginid.email_on_member_cancelled}
 
* {$details.loginid.email_on_member_rebilled}
 
* {$details.loginid.email_on_member_joined}
 
* {$details.loginid.access_preset}
 
* {$details.loginid.post_member_approval}
 
* {$details.loginid.post_member_rebill}
 
* {$details.loginid.post_member_upgrade}
 
* {$details.loginid.post_member_expire}
 
* {$details.loginid.post_member_insufficient_fund}
 
* {$details.loginid.post_member_credit}
 
* {$details.loginid.post_member_chargeback}
 
* {$details.loginid.post_member_void}
 
* {$details.loginid.post_member_upgradedeny}
 
* {$details.loginid.post_member_change_details}
 
* {$details.loginid.live_update_defaults}
 
* {$details.loginid.default_stats_view}
 
* {$details.loginid.default_stats_date_range}
 
* {$details.loginid.default_stats_limit_site}
 
* {$details.loginid.default_stats_limit_program}
 
* {$details.loginid.default_stats_limit_campaign}
 
* {$details.loginid.default_stats_small_map_1_data}
 
* {$details.loginid.default_stats_small_map_2_data}
 
* {$details.loginid.default_stats_pie_chart_1_data}
 
* {$details.loginid.default_stats_pie_chart_2_data}
 
* {$details.loginid.default_stats_pie_chart_3_data}
 
* {$details.loginid.default_stats_pie_chart_4_data}
 
* {$details.loginid.default_stats_pie_chart_5_data}
 
* {$details.loginid.default_stats_pie_chart_1_break}
 
* {$details.loginid.default_stats_pie_chart_2_break}
 
* {$details.loginid.default_stats_pie_chart_3_break}
 
* {$details.loginid.default_stats_pie_chart_4_break}
 
* {$details.loginid.default_stats_pie_chart_5_break}
 
* {$details.loginid.default_stats_mixed_chart_1_type}
 
* {$details.loginid.default_stats_mixed_chart_2_type}
 
* {$details.loginid.default_stats_mixed_chart_1_data}
 
* {$details.loginid.default_stats_mixed_chart_2_data}
 
* {$details.loginid.default_stats_multi_graph_data_1}
 
* {$details.loginid.default_stats_multi_graph_data_2}
 
* {$details.loginid.default_stats_multi_graph_data_3}
 
* {$details.loginid.default_stats_large_map_data}
 
* {$details.loginid.default_stats_comp_data}
 
* {$details.loginid.default_stats_order}
 
* {$details.loginid.default_stats_table_column1}
 
* {$details.loginid.default_stats_table_column2}
 
* {$details.loginid.default_stats_table_column3}
 
* {$details.loginid.default_stats_table_column4}
 
* {$details.loginid.default_stats_table_column5}
 
* {$details.loginid.default_stats_table_column6}
 
* {$details.loginid.default_stats_table_column7}
 
* {$details.loginid.default_stats_table_column8}
 
* {$details.loginid.default_stats_table_column9}
 
* {$details.loginid.default_adtools_view}
 
* {$details.loginid.default_adtools_cat_1_type}
 
* {$details.loginid.default_adtools_cat_2_type}
 
* {$details.loginid.default_adtools_cat_3_type}
 
* {$details.loginid.default_adtools_cat_4_type}
 
* {$details.loginid.default_adtools_cat_5_type}
 
* {$details.loginid.default_adtools_publish_setting}
 
* {$details.loginid.default_adtools_publish_date}
 
* {$details.loginid.default_adtools_dump_separater}
 
* {$details.loginid.default_adtools_dump_record_end}
 
* {$details.loginid.default_adtools_dump_field_1}
 
* {$details.loginid.default_adtools_dump_field_2}
 
* {$details.loginid.default_adtools_dump_field_3}
 
* {$details.loginid.default_adtools_dump_field_4}
 
* {$details.loginid.default_adtools_dump_field_5}
 
* {$details.loginid.default_adtools_dump_field_6}
 
* {$details.loginid.default_adtools_dump_field_7}
 
* {$details.loginid.default_adtools_dump_field_8}
 
* {$details.loginid.default_news_announcement_section}
 
* {$details.loginid.default_news_section}
 
* {$details.loginid.default_news_count}
 
* {$details.loginid.default_account_view}
 
* {$details.loginid.default_account_changes_count}
 
* {$details.loginid.default_account_changes_order}
 
* {$details.loginid.default_account_campaign_count}
 
* {$details.loginid.default_account_campaign_order}
 
  
 
== details.campaignid ==
 
== details.campaignid ==
The details.campaignid array holds information about the campaign the
+
The details.campaignid array holds information about the [[Ct#Campaign|campaign]] that the
member signed up under.
+
[[Ct#Member|member]] signed up under. These variables can be used on the mailer [[Ct#Template|templates]] beginning with the ''mail_member_'', ''mail_owner_'', and ''mail_affiliate_on_member_'' prefixes.
  
 
* {$details.campaignid.campaignid}
 
* {$details.campaignid.campaignid}
Line 243: Line 211:
 
* {$details.campaignid.hide}
 
* {$details.campaignid.hide}
 
* {$details.campaignid.old_campaignid}
 
* {$details.campaignid.old_campaignid}
 +
  
 
== details.programid ==
 
== details.programid ==
The details.campaignid array holds information about the program the
+
The details.programid array holds information about the [[Ct#Program|program]] that the
member signed up under.
+
[[Ct#Member|member]] signed up under. These variables can be used on the mailer [[Ct#Template|templates]] beginning with the ''mail_member_'', ''mail_owner_'', and ''mail_affiliate_on_member_'' prefixes.
  
 
* {$details.programid.programid}
 
* {$details.programid.programid}
Line 267: Line 236:
 
* {$details.programid.verify_initial}
 
* {$details.programid.verify_initial}
 
* {$details.programid.retro_payout}
 
* {$details.programid.retro_payout}
 +
* {$details.programid.hide_rebills}
 +
* {$details.programid.hide_joins}
 +
* {$details.programid.description}
 +
* {$details.programid.thumb}
 +
  
 
== details.siteid ==
 
== details.siteid ==
The details.campaignid array holds information about the site the
+
The details.siteid array holds information about the [[Ct#Site|site]] the
member signed up under.
+
[[Ct#Member|member]] signed up under. These variables can be used on the mailer [[Ct#Template|templates]] beginning with the ''mail_member_'', ''mail_owner_'', and ''mail_affiliate_on_member_'' prefixes.
  
 
* {$details.siteid.siteid}
 
* {$details.siteid.siteid}
Line 282: Line 256:
 
* {$details.siteid.date_live}
 
* {$details.siteid.date_live}
 
* {$details.siteid.network}
 
* {$details.siteid.network}
 +
* {$details.siteid.reuse_active}
 +
* {$details.siteid.no_personal_member_info}
 +
* {$details.siteid.mobile_tour}
 +
* {$details.siteid.site_group_id}
 +
  
 
== details.tourid ==
 
== details.tourid ==
The details.campaignid array holds information about the tour the
+
The details.tourid array holds information about the [[Ct#Tour|tour]] the
member signed up under.
+
[[Ct#Member|member]] signed up under. These variables can be used on the mailer [[Ct#Template|templates]] beginning with the ''mail_member_'', ''mail_owner_'', and ''mail_affiliate_on_member_'' prefixes.
  
 
* {$details.tourid.tourid}
 
* {$details.tourid.tourid}
Line 339: Line 318:
 
* {$details.tourid.change_detailspost}
 
* {$details.tourid.change_detailspost}
  
== details.billerid ==
 
The details.campaignid array holds information about the biller the
 
member signed up under.
 
 
* {$details.billerid.billerid}
 
* {$details.billerid.networkid}
 
* {$details.billerid.biller}
 
* {$details.billerid.last_poll}
 
* {$details.billerid.form_method}
 
* {$details.billerid.deleted}
 
  
 
== details.optionid ==
 
== details.optionid ==
The details.campaignid array holds information about the join option the
+
The details.optionid array holds information about the [[Ct#Join Option|join option]] the
member signed up under.
+
[[Ct#Member|member]] signed up under. These variables can be used on the mailer [[Ct#Template|templates]] beginning with the ''mail_member_'', ''mail_owner_'', and ''mail_affiliate_on_member_'' prefixes.
  
 
* {$details.optionid.optionid}
 
* {$details.optionid.optionid}
* {$details.optionid.siteid}
+
* {$details.optionid.initial}
* {$details.optionid.networkid}
+
* {$details.optionid.initial_days}
* {$details.optionid.deleted}
+
* {$details.optionid.rebill}
* {$details.optionid.enabled}
+
* {$details.optionid.rebill_days}
* {$details.optionid.orderid}
+
* {$details.optionid.name}
* {$details.optionid.option_type_id}
+
* {$details.optionid.packageid}
* {$details.optionid.billerid}
+
* {$details.optionid.no_old_members}
* {$details.optionid.programid}
+
* {$details.optionid.hidden}
 +
* {$details.optionid.initial_free}
 +
* {$details.optionid.package_upgrade_allowed}
 +
* {$details.optionid.token_rebuy_allowed}
 +
 
  
 
== details.countryid ==
 
== details.countryid ==
 
If country information is available, you can also use the
 
If country information is available, you can also use the
following variables in details.countryid array
+
following variables in details.countryid array. These variables can be used on the mailer [[Ct#Template|templates]] beginning with the ''mail_member_'', ''mail_owner_'', and ''mail_affiliate_on_member_'' prefixes.
 +
 
 +
* {$details.countryid.short} - two letter abbreviation of country
 +
* {$details.countryid.name} - full name of country
 +
 
 +
== Profits ==
 +
 
 +
TRUE PROFIT CALCULATIONS
  
* {$details.countryid.short}
+
As of version 4.0.71.2
* {$details.countryid.name}
 
  
== affiliate details ==
+
Profit calculation(in mail_owner_joined template): <br>
When sending an email to an affiliate you should use the following variables to output their information:  
+
{math equation="(y-x-z)/100" x=$member.cost_charge y=$member.transaction.amount z=$member.transaction.total_transaction_payout assign='profit'}<br>
 +
Profit: {$profit|string_format:"%.2f"}
  
* {$username}
+
In this equation the variable Z calculates the [[Ct#Affiliate|affiliate]] [[Ct#Payout|payouts]] for ALL affiliates including [[Ct#Site Partner|site partners]] etc.
* {$usr_access}
+
<!-- In the next version, 4.0.73.1, This variable will be broken down further to allow you to grab the transaction details for a specific subscription, including the detailed list of [[Ct#Payout|payouts]] for the transaction. -->
* {$usr_type}
+
[[Category:NATS4 Mailers]]
* {$usr_us_w9}
 
* {$verify}
 
* {$verify_defaults}
 
* {$verify_details}
 
* {$verify_payvia}
 
* {$verify_payvia_info}
 
* {$verify_settings}
 
* {$w9}
 
* {$address1}
 
* {$address2}
 
* {$city}
 
* {$company}
 
* {$state}
 
* {$status}
 
* {$tax_id_or_ssn}
 
* {$tel}
 
* {$zip_code}
 
* {$country}
 
* {$email}
 
* {$firstname}
 
* {$flag1}
 
* {$flag2}
 
* {$flag3}
 
* {$flag4}
 
* {$flag5}
 
* {$fullname}
 
* {$icq}
 
* {$url}
 
* {$custom1}
 
* {$custom2}
 
* {$custom3}
 
* {$custom4}
 
* {$custom5}
 
* {$date_posted}
 
* {$default_account_campaign_count}
 
* {$default_account_campaign_order}
 
* {$default_account_changes_count}
 
* {$default_account_changes_order}
 
* {$default_account_view}
 
* {$default_adtools_cat_1_type}
 
* {$default_adtools_cat_2_type}
 
* {$default_adtools_cat_3_type}
 
* {$default_adtools_cat_4_type}
 
* {$default_adtools_cat_5_type}
 
* {$default_adtools_dump_field_1}
 
* {$default_adtools_dump_field_2}
 
* {$default_adtools_dump_field_3}
 
* {$default_adtools_dump_field_4}
 
* {$default_adtools_dump_field_5}
 
* {$default_adtools_dump_field_6}
 
* {$default_adtools_dump_field_7}
 
* {$default_adtools_dump_field_8}
 
* {$default_adtools_dump_record_end}
 
* {$default_adtools_dump_separater}
 
* {$default_adtools_publish_date}
 
* {$default_adtools_publish_setting}
 
* {$default_adtools_use_limits}
 
* {$default_adtools_view}
 
* {$default_campaign}
 
* {$default_news_announcement_section}
 
* {$default_news_count}
 
* {$default_news_section}
 
* {$default_program}
 
* {$default_site}
 
* {$default_stats_comp_data}
 
* {$default_stats_date_range}
 
* {$default_stats_large_map_data}
 
* {$default_stats_limit_campaign}
 
* {$default_stats_limit_program}
 
* {$default_stats_limit_site}
 
* {$default_stats_mixed_chart_1_data}
 
* {$default_stats_mixed_chart_1_type}
 
* {$default_stats_mixed_chart_2_data}
 
* {$default_stats_mixed_chart_2_type}
 
* {$default_stats_multi_graph_data_1}
 
* {$default_stats_multi_graph_data_2}
 
* {$default_stats_multi_graph_data_3}
 
* {$default_stats_order} "2"
 
* {$default_stats_pie_chart_1_break}
 
* {$default_stats_pie_chart_1_data}
 
* {$default_stats_pie_chart_2_break}
 
* {$default_stats_pie_chart_2_data}
 
* {$default_stats_pie_chart_3_break}
 
* {$default_stats_pie_chart_3_data}
 
* {$default_stats_pie_chart_4_break}
 
* {$default_stats_pie_chart_4_data}
 
* {$default_stats_pie_chart_5_break}
 
* {$default_stats_pie_chart_5_data}
 
* {$default_stats_small_map_1_data}
 
* {$default_stats_small_map_2_data}
 
* {$default_stats_table_column1}
 
* {$default_stats_table_column2}
 
* {$default_stats_table_column3}
 
* {$default_stats_table_column4}
 
* {$default_stats_table_column5}
 
* {$default_stats_table_column6}
 
* {$default_stats_table_column7}
 
* {$default_stats_table_column8}
 
* {$default_stats_table_column9}
 
* {$default_stats_view}
 
* {$deleted}
 
* {$email_on_member_cancelled}
 
* {$email_on_member_change}
 
* {$email_on_member_chargeback}
 
* {$email_on_member_credited}
 
* {$email_on_member_insufficient}
 
* {$email_on_member_joined}
 
* {$email_on_member_rebilled}
 
* {$email_on_member_voided}
 
* {$email_on_notify}
 
* {$email_promotional}
 
* {$inhouse}
 
* {$invoicer}
 
* {$is_startpage}
 
* {$join_date}
 
* {$join_ip}
 
* {$last_login}
 
* {$last_login_ip}
 
* {$lastname}
 
* {$latest_news}
 
* {$live_update_defaults}
 
* {$loginform}
 
* {$loginid}
 
* {$mailok}
 
* {$minimum_payout}
 
* {$msn}
 
* {$new_notification}
 
* {$new_notification_count}
 
* {$notify_defaults}
 
* {$notify_details}
 
* {$notify_member_cancelled}
 
* {$notify_member_change}
 
* {$notify_member_chargeback}
 
* {$notify_member_credited}
 
* {$notify_member_insufficient}
 
* {$notify_member_joined}
 
* {$notify_member_rebilled}
 
* {$notify_member_voided}
 
* {$notify_password}
 
* {$notify_payvia}
 
* {$notify_payvia_info}
 
* {$notify_settings}
 
* {$payout_approval}
 
* {$payvia_type_id}
 
* {$post_member_approval}
 
* {$post_member_change_details}
 
* {$post_member_chargeback}
 
* {$post_member_credit}
 
* {$post_member_expire}
 
* {$post_member_insufficient_fund}
 
* {$post_member_rebill}
 
* {$post_member_upgrade}
 
* {$post_member_upgradedeny}
 
* {$post_member_void}
 
* {$project_name}
 
* {$pv_instant}
 
* {$reason}
 
* {$rep_baseline}
 
* {$req_docs}
 
* {$reseller_flags}
 
* {$reviewed}
 
* {$script}
 
* {$select1}
 
* {$select2}
 
* {$select3}
 
* {$select4}
 
* {$select5}
 
* {$skinid}
 
* {$startpage}
 
* {$trust_level}
 
* {$type}
 
* {$unencoded}
 

Latest revision as of 11:28, 31 January 2017

NATS 4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers
Mailing Admin
The Mailing Admin
Create New Mailer
Email Configuration
The Mailing Queue
Mailer Template Variables
Mass Mailing Template Variables
Common Mailer Examples
Setting Rules

You can use the following variables, grouped by their arrays, on templates in the Skins and Templates Admin and Site Templates that get mailed to affiliates and members. For example, mail_affiliate_on_member_joined or mail_member_change. When testing your changes, make sure that you customize both the regular e-mail template and the _html e-mail template. Unless both forms of the template are properly configured, your e-mails will not be sent.

member

The following variables hold members' information. These are available in mail_member_, mail_owner_, and mail affiliate_on_member_:

  • {$member.loginid} - The affiliate's ID that member was referred from in NATS
  • {$member.status} - the status of the member.
    • 0: Never Joined
    • 1: Active
    • 2: Expired
  • {$member.trial} - whether they are on trial or not.
    • 0: not trial
    • 1: trial
  • {$member.joined} - when they joined
  • {$member.expired} - when they have completely expired (set to 0 until completely expired)
  • {$member.siteid} - site id member signed up under
  • {$member.optionid} - join option id member signed up under
  • {$member.billerid} - biller id member signed up under
  • {$member.rebills} - the time the member will rebill next
  • {$member.custom1} - the custom field in the members admin
  • {$member.custom2}
  • {$member.custom3}
  • {$member.custom4}
  • {$member.custom5}
  • {$member.transaction} - Array of transaction details
  • {$member.transaction.transaction_id} - transaction ID under the subscription in NATS
  • {$member.transaction.biller_transid} - Biller transaction ID reported to NATS with biller short name prepended
  • {$member.transaction.biller_time} - time the transaction occured on biller's side
  • {$member.transaction.server_time} - time the transaction was recorded in NATS
  • {$member.transaction.biller_transid} - transaction ID on the biller's side
  • {$member.transaction.total_transaction_payout} - payout to the affiliate on this transaction
  • {$member.transaction.amount} - calculated amount of transaction in NATS
  • {$member.transaction.biller_amount} - amount of transaction reported by biller
  • {$member.transaction.biller_currency} - currency of biller_amount reported by biller


The following variables hold additional members' information but are only available in mail_member_ and mail_owner_:

  • {$member.memberid} - the id of the member
  • {$member.firstname} - first name of the member
  • {$member.lastname} - last name of the member
  • {$member.address1} - first line of address
  • {$member.address2} - second line of address
  • {$member.zip} - the zip code
  • {$member.city} - city of address
  • {$member.country} - country
  • {$member.state} - state
  • {$member.member_subscription_id} - subscription ID of member in NATS
  • {$member.shipping_firstname} - shipping first name
  • {$member.shipping_lastname} - shipping last name
  • {$member.shipping_address1} - shipping address 1
  • {$member.shipping_address2} - shipping address 2
  • {$member.shipping_zip} - shipping zip code
  • {$member.shipping_city} - shipping city
  • {$member.shipping_country} - shipping country
  • {$member.shipping_state} - shipping state
  • {$member.phone} - member's phone number
  • {$member.xsell_success} - Do Not Use
  • {$member.xsell_message} - the xsell message sent
  • {$member.last_modified} - last time the member was modified
  • {$member.identid} - a unique number that contains information about the campaignid, tourid, siteid, optionid etc.
  • {$member.refurl_lookup_id} An id that identifies the URL that referred the member.
    • Note: This only retrieves the ID number and not the referring URL. To get the URL, use the template function nats_get_refurl.
    • For example: {nats_get_refurl refid=$member.refurl_lookup_id} to set the function, then use the Smarty function: {$nats_refurl} to display it.
  • {$member.last_login} - last time they logged in
  • {$member.stamp} - last time member was updated
  • {$member.username} - the member's username
  • {$member.cryptpass} - the crypted password
  • {$member.ip} - the ip they used to sign up
  • {$member.email} - the email they signed up with
  • {$member.session} - session id of the member in NATS
  • {$member.mailok} - if the member opted in for emails. 1 if yes, 0 for no
  • {$member.flat_price}
  • {$member.first_login} - when they first logged in.
  • {$member.third_party_partner_id} - the id of the third party
  • {$member.cascadeid} - The id for the cascade that the member used to sign up.
  • {$member.cascade_item_id} - The id for the biller in the cascade that the member used to sign up.
  • {$member.token} - The hash that each member of a token site uses to authenticate.
  • {$member.original_username} The member's original username.
  • {$member.renamed} - The date when the member's username was changed.

affiliate

The following variables hold affiliates' information, for affiliates that sign up to your affiliate program. These variables can be used on the mailer templates mail_owner_affiliate_signup and mail_affiliate_on_signup. All of the stored affiliate information can be found in the $affiliate array.

  • {$affiliate.nats}
  • {$affiliate.company}
  • {$affiliate.url}
  • {$affiliate.firstname}
  • {$affiliate.lastname}
  • {$affiliate.email}
  • {$affiliate.nostore_verify_email}
  • {$affiliate.mailok}
  • {$affiliate.icq}
  • {$affiliate.aim}
  • {$affiliate.msn}
  • {$affiliate.username}
  • {$affiliate.password}
  • {$affiliate.nostore_verify_password}
  • {$affiliate.address1}
  • {$affiliate.address2}
  • {$affiliate.city}
  • {$affiliate.state}
  • {$affiliate.zip_code}
  • {$affiliate.country}
  • {$affiliate.tax_id_or_ssn}
  • {$affiliate.payvia}
  • {$affiliate.minimum_payout}
  • {$affiliate.verify}

details.loginid

The details.login array holds the NATS information about an affiliate who referred a specific member. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_ prefixes.

  • {$details.loginid.loginid} - affiliate's ID in NATS
  • {$details.loginid.username} - affiliate's username
  • {$details.loginid.password} - affiliate's password
  • {$details.loginid.deleted} - if the affiliate is deleted or not.
    • 0 - not deleted
    • 1 - deleted
  • {$details.loginid.type} - ID access level of the affiliate
  • {$details.loginid.skinid} - ID of the skin the affiliate is using
  • {$details.loginid.payvia_type_id} - ID of the payvia method affiliate is using
  • {$details.loginid.status} - status of the affiliate
    • 0: Active
    • 1: Disabled
    • 2: Banned
    • 3: Wait on Verify
    • 4: Pending
    • 5: Denied
  • {$details.loginid.pass_hash} - password hash
  • {$details.loginid.join_date} - when the affiliate joined
  • {$details.loginid.inhouse} - if the affiliate is an inhouse account or not
    • 0 - not inhouse
    • 1 - inhouse
  • {$details.loginid.firstname} - affiliate's first name
  • {$details.loginid.lastname} - affiliate's last name
  • {$details.loginid.email} - affiliate's email
  • {$details.loginid.date_posted}
  • {$details.loginid.last_login} - when the affiliate last logged in
  • {$details.loginid.last_login_ip} - the IP the affiliate last logged in from
  • {$details.loginid.reviewed} - if the affiliate is manually marked as reviewed
    • 0 - not reviewed
    • 1 - reviewed
  • {$details.loginid.minimum_payout} - the minimum payout the affiliate set for their payvia type
  • {$details.loginid.bonus}
  • {$details.loginid.verify}
  • {$details.loginid.reason}
  • {$details.loginid.unencoded}
  • {$details.loginid.startpage}
  • {$details.loginid.rep_baseline}
  • {$details.loginid.company} - the company of the affiliate
  • {$details.loginid.url} - the url of the affiliate
  • {$details.loginid.tel} - the telephone number of the affiliate
  • {$details.loginid.icq} - ICQ number of affiliate
  • {$details.loginid.aim} - AIM username of affiliate
  • {$details.loginid.msn} - MSN username of affiliate
  • {$details.loginid.address1} - address of affiliate
  • {$details.loginid.address2}
  • {$details.loginid.city} - city of affiliate
  • {$details.loginid.state} - state of affiliate
  • {$details.loginid.country} - country of affiliate
  • {$details.loginid.zip_code} - zip code of affiliate
  • {$details.loginid.tax_id_or_ssn} - tax ID or SSN of the affiliate
  • {$details.loginid.invoicer}
  • {$details.loginid.req_docs} - if affiliate is marked as having the required documentation
  • {$details.loginid.w9} - if the affiliate has a W9 uploaded or not
    • 0 - no W9
    • 1 - has W9
  • {$details.loginid.mailok} - if affiliate opted in for emails or not
    • 0 - not opted in
    • 1 - opted in
  • {$details.loginid.trust_level}
  • {$details.loginid.new_notification}
  • {$details.loginid.default_campaign}
  • {$details.loginid.default_program}
  • {$details.loginid.default_site}
  • {$details.loginid.pv_instant}
  • {$details.loginid.payout_approval}


biller

The details.billerid array holds information about the biller the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.billerid.billerid} - ID of the biller in NATS
  • {$details.billerid.networkid}
  • {$details.billerid.biller} - the name of the biller
  • {$details.billerid.last_poll}
  • {$details.billerid.form_method}
  • {$details.billerid.deleted}


details.campaignid

The details.campaignid array holds information about the campaign that the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.campaignid.campaignid}
  • {$details.campaignid.loginid}
  • {$details.campaignid.name}
  • {$details.campaignid.description}
  • {$details.campaignid.created_date}
  • {$details.campaignid.hide}
  • {$details.campaignid.old_campaignid}


details.programid

The details.programid array holds information about the program that the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.programid.programid}
  • {$details.programid.program}
  • {$details.programid.hidden}
  • {$details.programid.type}
  • {$details.programid.name}
  • {$details.programid.extended_payout}
  • {$details.programid.max_ratio}
  • {$details.programid.fallbackid}
  • {$details.programid.addstr}
  • {$details.programid.deleted}
  • {$details.programid.abi_paycom_prefix}
  • {$details.programid.abi_paycom_perc}
  • {$details.programid.deduct_credits}
  • {$details.programid.deduct_chargebacks}
  • {$details.programid.deduct_voids}
  • {$details.programid.deduct_insufficient}
  • {$details.programid.verify_hash}
  • {$details.programid.verify_initial}
  • {$details.programid.retro_payout}
  • {$details.programid.hide_rebills}
  • {$details.programid.hide_joins}
  • {$details.programid.description}
  • {$details.programid.thumb}


details.siteid

The details.siteid array holds information about the site the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.siteid.siteid}
  • {$details.siteid.networkid}
  • {$details.siteid.site}
  • {$details.siteid.deleted}
  • {$details.siteid.name}
  • {$details.siteid.type}
  • {$details.siteid.hidden}
  • {$details.siteid.date_added}
  • {$details.siteid.date_live}
  • {$details.siteid.network}
  • {$details.siteid.reuse_active}
  • {$details.siteid.no_personal_member_info}
  • {$details.siteid.mobile_tour}
  • {$details.siteid.site_group_id}


details.tourid

The details.tourid array holds information about the tour the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.tourid.tourid}
  • {$details.tourid.tour}
  • {$details.tourid.siteid}
  • {$details.tourid.networkid}
  • {$details.tourid.name}
  • {$details.tourid.url}
  • {$details.tourid.linkdomain}
  • {$details.tourid.description}
  • {$details.tourid.thumb}
  • {$details.tourid.thumb_ext}
  • {$details.tourid.third_party_partner_id}
  • {$details.tourid.spartaurl}
  • {$details.tourid.denyurl}
  • {$details.tourid.denypost}
  • {$details.tourid.approvalurl}
  • {$details.tourid.approvalpost}
  • {$details.tourid.rebillpost}
  • {$details.tourid.creditpost}
  • {$details.tourid.chargebackpost}
  • {$details.tourid.insufficient_fundpost}
  • {$details.tourid.voidpost}
  • {$details.tourid.userpost}
  • {$details.tourid.userman}
  • {$details.tourid.expirepost}
  • {$details.tourid.custom}
  • {$details.tourid.admin_signup_email}
  • {$details.tourid.upgradeurl}
  • {$details.tourid.upgradepost}
  • {$details.tourid.allowed_lang}
  • {$details.tourid.alternativeurl}
  • {$details.tourid.allowed_lang_track_raw}
  • {$details.tourid.allowed_lang_track_unq}
  • {$details.tourid.hidden}
  • {$details.tourid.mail_member_joined}
  • {$details.tourid.mail_member_cancelled}
  • {$details.tourid.mail_member_rebilled}
  • {$details.tourid.mail_member_credited}
  • {$details.tourid.mail_member_chargedback}
  • {$details.tourid.mail_member_insufficient}
  • {$details.tourid.mail_member_voided}
  • {$details.tourid.upgradedenyurl}
  • {$details.tourid.upgradedenypost}
  • {$details.tourid.prejoinpost}
  • {$details.tourid.byo_owner}
  • {$details.tourid.byo_program}
  • {$details.tourid.byo_owner_only}
  • {$details.tourid.deleted}
  • {$details.tourid.niche}
  • {$details.tourid.strack_programid}
  • {$details.tourid.mail_member_change}
  • {$details.tourid.change_detailspost}


details.optionid

The details.optionid array holds information about the join option the member signed up under. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.optionid.optionid}
  • {$details.optionid.initial}
  • {$details.optionid.initial_days}
  • {$details.optionid.rebill}
  • {$details.optionid.rebill_days}
  • {$details.optionid.name}
  • {$details.optionid.packageid}
  • {$details.optionid.no_old_members}
  • {$details.optionid.hidden}
  • {$details.optionid.initial_free}
  • {$details.optionid.package_upgrade_allowed}
  • {$details.optionid.token_rebuy_allowed}


details.countryid

If country information is available, you can also use the following variables in details.countryid array. These variables can be used on the mailer templates beginning with the mail_member_, mail_owner_, and mail_affiliate_on_member_ prefixes.

  • {$details.countryid.short} - two letter abbreviation of country
  • {$details.countryid.name} - full name of country

Profits

TRUE PROFIT CALCULATIONS

As of version 4.0.71.2

Profit calculation(in mail_owner_joined template):
{math equation="(y-x-z)/100" x=$member.cost_charge y=$member.transaction.amount z=$member.transaction.total_transaction_payout assign='profit'}
Profit: {$profit|string_format:"%.2f"}

In this equation the variable Z calculates the affiliate payouts for ALL affiliates including site partners etc.