{$wa->myNav('subcategory')}
{include file="`$wa_active_theme_path`/breadcrumb.html" inline}

[`Affiliate program`]

{$balance = $customer.affiliate_bonus|wa_format_number:false} {if $customer.affiliate_bonus >= 0}{$balance = '+'|cat:$balance}{/if}

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

{$_aff_plugins_active = 0} {* @event frontend_my_affiliate.%plugin_id% *} {foreach $frontend_my_affiliate as $_}{$_}{$_aff_plugins_active = 1}{/foreach} {foreach $affiliate_history as $h} {foreachelse} {/foreach}
[`Date`] # [`Credit`] [`Debit`] [`Balance`]
{$h.create_datetime|wa_date:'humandatetime'} {if $h.order_id} [`Order`] {$wa->shop->orderId($h.order_id)} {/if} {if $h.order_id && $h.comment}
{/if} {if $h.comment} {$h.comment|escape} {/if}
{if $h.amount > 0} {$h.amount|wa_format_number:false} {/if} {if $h.amount < 0} {abs($h.amount)|wa_format_number:false} {/if} {$h.balance|wa_format_number:false}
[`You have no affiliate history yet.`]