{strip} {$_title = "[`Affiliate program`]"} {$wa->globals("globalHeader", $_title)} {$wa->globals("isMyAccount", true)} {$wa->globals("isAffiliatePage", true)} {$balance = round($customer.affiliate_bonus, 2)|wa_format_number:false} {if $customer.affiliate_bonus >= 0}{$balance = '+'|cat:$balance}{/if}

[`Bonus program`]

{sprintf('[`Your current affiliate bonus: %s`]', $balance)}

{if !empty($affiliate_history)} {foreach $affiliate_history as $h} {/foreach}
[`Bonus activity log`] [`Credit`] [`Debit`] [`Balance`]
{$h.create_datetime|wa_date:'humandate'}
{$h.create_datetime|wa_date:'time'}
{if $h.order_id && !empty($h.order_url)} [`Order`] {$wa->shop->orderId($h.order_id)} {/if} {if $h.comment}
{$h.comment|escape}
{/if}
{if $h.amount > 0} {round($h.amount,2)|wa_format_number:false} {/if} {if $h.amount < 0} {round(abs($h.amount),2)|wa_format_number:false} {/if} {round($h.balance,2)|wa_format_number:false}
{else}

[`You have no affiliate history yet.`]

{/if}
{* @event frontend_my_affiliate.%plugin_id% *} {foreach $frontend_my_affiliate as $_}
{$_}
{/foreach}
{/strip}