Difference between revisions of "NATS4 Mailer Template Variables"

From TMM Wiki
Jump to navigationJump to search
Line 8: Line 8:
 
The following variables hold [[Ct#Member|members]]' information.  
 
The following variables hold [[Ct#Member|members]]' information.  
  
* {$affiliate_payout} - shows the affiliate payout.
+
* {$member.affiliate_payout} - shows the affiliate payout.
* {$memberid} - the id of the member
+
* {$member.memberid} - the id of the member
* {$firstname} - first name of the member
+
* {$member.firstname} - first name of the member
* {$lastname} - last name of the member
+
* {$member.lastname} - last name of the member
* {$address1} - first line of address
+
* {$member.address1} - first line of address
* {$address2} - second line of address
+
* {$member.address2} - second line of address
* {$zip} - the zip code
+
* {$member.zip} - the zip code
* {$city} - city of address
+
* {$member.city} - city of address
* {$country} - country
+
* {$member.country} - country
* {$state} - state
+
* {$member.state} - state
* {$shipping_firstname} - shipping first name  
+
* {$member.shipping_firstname} - shipping first name  
* {$shipping_lastname} - shipping last name
+
* {$member.shipping_lastname} - shipping last name
* {$shipping_address1} - shipping address 1
+
* {$member.shipping_address1} - shipping address 1
* {$shipping_address2} - shipping address 2
+
* {$member.shipping_address2} - shipping address 2
* {$shipping_zip} - shipping zip code
+
* {$member.shipping_zip} - shipping zip code
* {$shipping_city} - shipping city
+
* {$member.shipping_city} - shipping city
* {$shipping_country} - shipping country
+
* {$member.shipping_country} - shipping country
* {$shipping_state} - shipping state
+
* {$member.shipping_state} - shipping state
* {$phone} - member's phone number
+
* {$member.phone} - member's phone number
* {$xsell_success} - if the xsell is successful
+
* {$member.xsell_success} - if the xsell is successful
* {$xsell_message} - the xsell message sent
+
* {$member.xsell_message} - the xsell message sent
* {$custom1} - the custom field in the members admin  
+
* {$member.custom1} - the custom field in the members admin  
* {$custom2}
+
* {$member.custom2}
* {$custom3}
+
* {$member.custom3}
* {$custom4}
+
* {$member.custom4}
* {$custom5}
+
* {$member.custom5}
* {$last_modified} - last time the member  
+
* {$member.last_modified} - last time the member  
* {$identid} - a unique number that contains information about the campaignid, tourid, siteid, optionid etc.
+
* {$member.identid} - a unique number that contains information about the campaignid, tourid, siteid, optionid etc.
* {$loginid} - The member's username
+
* {$member.loginid} - The member's username
* {$refurl_lookup_id} An id that identifies the URL that referred the member.
+
* {$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''.  
 
** 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.
 
**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.
* {$status} - the status of the member
+
* {$member.status} - the status of the member
* {$trial} - whether they are on trial or not
+
* {$member.trial} - whether they are on trial or not
* {$joined} - when they joined
+
* {$member.joined} - when they joined
* {$expired} - when they will be expired
+
* {$member.expired} - when they will be expired
* {$last_login} - last time they logged in
+
* {$member.last_login} - last time they logged in
* {$stamp}  
+
* {$member.stamp}  
* {$siteid} - which site they signed up with
+
* {$member.siteid} - which site they signed up with
* {$username} - the member's username
+
* {$member.username} - the member's username
* {$cryptpass} - the crypted password
+
* {$member.cryptpass} - the crypted password
* {$ip} - the ip they used to sign up
+
* {$member.ip} - the ip they used to sign up
* {$email} - the email they signed up with
+
* {$member.email} - the email they signed up with
* {$session}  
+
* {$member.session}  
* {$mailok}
+
* {$member.mailok}
* {$flat_price}  
+
* {$member.flat_price}  
* {$first_login} - when they first logged in.
+
* {$member.first_login} - when they first logged in.
* {$third_party_partner_id} - the id of the third party
+
* {$member.third_party_partner_id} - the id of the third party
* {$cascadeid} - The id for the cascade that the member used to sign up.  
+
* {$member.cascadeid} - The id for the cascade that the member used to sign up.  
* {$cascade_item_id} - The id for the biller in 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.
* {$token} - The hash that each member of a token site uses to authenticate.
+
* {$member.token} - The hash that each member of a token site uses to authenticate.
* {$original_username} The member's original username.
+
* {$member.original_username} The member's original username.
* {$renamed} - The date when the member's username was changed.
+
* {$member.renamed} - The date when the member's username was changed.
  
 
== affiliate ==
 
== affiliate ==

Revision as of 12:37, 4 February 2013

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. 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.

  • {$member.affiliate_payout} - shows the affiliate payout.
  • {$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.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
  • {$member.xsell_message} - the xsell message sent
  • {$member.custom1} - the custom field in the members admin
  • {$member.custom2}
  • {$member.custom3}
  • {$member.custom4}
  • {$member.custom5}
  • {$member.last_modified} - last time the member
  • {$member.identid} - a unique number that contains information about the campaignid, tourid, siteid, optionid etc.
  • {$member.loginid} - The member's username
  • {$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.status} - the status of the member
  • {$member.trial} - whether they are on trial or not
  • {$member.joined} - when they joined
  • {$member.expired} - when they will be expired
  • {$member.last_login} - last time they logged in
  • {$member.stamp}
  • {$member.siteid} - which site they signed up with
  • {$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}
  • {$member.mailok}
  • {$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 beginning with the mail_affiliate_on_, mail_account_rep_, and mail_owner_ prefixes. 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_on_member_ prefixes.

  • {$details.loginid.loginid}
  • {$details.loginid.username}
  • {$details.loginid.password}
  • {$details.loginid.deleted}
  • {$details.loginid.type}
  • {$details.loginid.skinid}
  • {$details.loginid.payvia_type_id}
  • {$details.loginid.status}
  • {$details.loginid.pass_hash}
  • {$details.loginid.join_date}
  • {$details.loginid.inhouse}
  • {$details.loginid.loginid}
  • {$details.loginid.firstname}
  • {$details.loginid.lastname}
  • {$details.loginid.email}
  • {$details.loginid.date_posted}
  • {$details.loginid.last_login}
  • {$details.loginid.last_login_ip}
  • {$details.loginid.reviewed}
  • {$details.loginid.minimum_payout}
  • {$details.loginid.bonus}
  • {$details.loginid.verify}
  • {$details.loginid.reason}
  • {$details.loginid.unencoded}
  • {$details.loginid.startpage}
  • {$details.loginid.rep_baseline}
  • {$details.loginid.company}
  • {$details.loginid.url}
  • {$details.loginid.tel}
  • {$details.loginid.icq}
  • {$details.loginid.aim}
  • {$details.loginid.msn}
  • {$details.loginid.address1}
  • {$details.loginid.address2}
  • {$details.loginid.city}
  • {$details.loginid.state}
  • {$details.loginid.country}
  • {$details.loginid.zip_code}
  • {$details.loginid.tax_id_or_ssn}
  • {$details.loginid.invoicer}
  • {$details.loginid.req_docs}
  • {$details.loginid.w9}
  • {$details.loginid.mailok}
  • {$details.loginid.trust_level}
  • {$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_program}
  • {$details.loginid.default_site}
  • {$details.loginid.pv_instant}
  • {$details.loginid.payout_approval}
  • {$details.loginid.notify_password}
  • {$details.loginid.notify_payvia}
  • {$details.loginid.notify_payvia_info}
  • {$details.loginid.notify_defaults}
  • {$details.loginid.notify_details}
  • {$details.loginid.notify_settings}
  • {$details.loginid.notify_member_change}
  • {$details.loginid.notify_member_voided}
  • {$details.loginid.notify_member_chargeback}
  • {$details.loginid.notify_member_credited}
  • {$details.loginid.notify_member_insufficient}
  • {$details.loginid.notify_member_cancelled}
  • {$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

The details.campaignid array holds information about the campaign that the member signed up under.

  • {$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.

  • {$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.siteid

The details.siteid array holds information about the site the member signed up under.

  • {$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.tourid

The details.tourid array holds information about the tour the member signed up under.

  • {$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.billerid

The details.billerid 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

The details.optionid array holds information about the join option the member signed up under.

  • {$details.optionid.optionid}
  • {$details.optionid.siteid}
  • {$details.optionid.networkid}
  • {$details.optionid.deleted}
  • {$details.optionid.enabled}
  • {$details.optionid.orderid}
  • {$details.optionid.option_type_id}
  • {$details.optionid.billerid}
  • {$details.optionid.programid}

details.countryid

If country information is available, you can also use the following variables in details.countryid array.

  • {$details.countryid.short}
  • {$details.countryid.name}

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. 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 payouts for the transaction.