{include file="header.tpl.html" header=$smarty.const.STRING_AFFILIATE_PROGRAM}

{$smarty.const.STRING_CONTACT_INFORMATION_DOWN_CASE} | {$smarty.const.STRING_ADDRESS_BOOK} | {$smarty.const.STRING_ORDER_HISTORY} | {$smarty.const.STRING_VISIT_HISTORY}{if $smarty.const.CONF_AFFILIATE_PROGRAM_ENABLED} | {$smarty.const.STRING_AFFILIATE_PROGRAM}{/if}

{$smarty.const.AFFP_USER_BALANCE} | {$smarty.const.AFFP_PAYMENTS_HISTORY}{if $CONF_AFFILIATE_EMAIL_NEW_COMMISSION or $CONF_AFFILIATE_EMAIL_NEW_PAYMENT} | {$smarty.const.STRING_MODULE_SETTING}{/if} | {$smarty.const.AFFP_ATTRACT_GUIDE}

{if $SubPage=='balance'}

{$smarty.const.AFFP_USER_BALANCE} {$smarty.const.STRING_AFFILIATE_CUSTOMERS}: {$affiliate_customers}

{if $CommissionsNumber}

{$smarty.const.AFFP_STRING_TOTAL_EARNINGS} | {$smarty.const.AFFP_STRING_TOTAL_PAYMENTS} | {$smarty.const.AFFP_USER_BALANCE}
{foreach from=$CurrencyISO3 item=_CurrencyISO} {if $CommissionsAmount[$_CurrencyISO.currency_iso_3] or $PaymentsAmount[$_CurrencyISO.currency_iso_3]}
{$_CurrencyISO.currency_iso_3} {$CommissionsAmount[$_CurrencyISO.currency_iso_3]|string_format:"%.2f"} | {$PaymentsAmount[$_CurrencyISO.currency_iso_3]|string_format:"%.2f"} | {"`$CommissionsAmount[$_CurrencyISO.currency_iso_3]-$PaymentsAmount[$_CurrencyISO.currency_iso_3]`"|string_format:"%.2f"}
{/if} {/foreach}

{else}

{$smarty.const.AFFP_MSG_NO_BALANCE}

{/if} {/if} {if $SubPage=='payments_history'}

{$smarty.const.AFFP_PAYMENTS_HISTORY}

{if $PaymentsNumber}

{$smarty.const.AFFP_PAYMENT_NUMBER} | {$smarty.const.ADMIN_CURRENT_DATE} | {$smarty.const.STRING_ADMIN_COMMENT} | {$smarty.const.STRING_SUM}
{foreach from=$Payments item=_Payment}
P-{$_Payment.pID} | {$_Payment.xDate} | {$_Payment.Description} | {$_Payment.Amount} {$_Payment.CurrencyISO3}
{/foreach}

{else}

{$smarty.const.AFFP_MSG_NO_PAYMENTS}

{/if} {/if} {if $SubPage=='settings'}

{$smarty.const.STRING_MODULE_SETTING} {if $SettingsSaved} {$smarty.const.MSG_INFORMATION_SAVED} {/if} {if $CONF_AFFILIATE_EMAIL_NEW_COMMISSION or $CONF_AFFILIATE_EMAIL_NEW_PAYMENT} {if $CONF_AFFILIATE_EMAIL_NEW_COMMISSION} {$smarty.const.AFFP_EMAILORDERS} {/if}{* if $CONF_AFFILIATE_EMAIL_NEW_COMMISSION *} {if $CONF_AFFILIATE_EMAIL_NEW_PAYMENT} {$smarty.const.AFFP_EMAILPAYMENTS} {/if}{* if $CONF_AFFILIATE_EMAIL_NEW_PAYMENT *} {$smarty.const.SAVE_BUTTON} {/if}

{/if} {if $SubPage=='attract_guide'}

{$smarty.const.AFFP_ATTRACT_GUIDE} {$_AFFP_STRING_ATTRACT_GUIDE}

{/if}