{if !empty($contact['password'])}
{if $contact.is_user}
[`Permanent user account with Webasyst backend access`]
{else}
[`Permanent user account`]
{/if}
[`Last login`]: {$contact.last_login_datetime|wa_datetime:"humandatetime"|default:'[`Never`]'}
{else} [`No permanent user account`]{if $total_paid_num > 0} [`Guest checkout without signup`] {else} [`No activity in your store yet`] {/if}
{/if}
{if empty($contact['password'])}
[`Create a customer account`]
{else}
[`Reset password`]
{/if}
{/if}
{include file="./include.top_fields.html"
top=$top
similar_contacts=$similar_contacts
need_other_values=true
inline}
{if $total_paid_num > 0}
{$total_paid_str}
{if $days_ago < 1}
[`Last paid order: today`]
{else}
{_w('Last paid order: %d day ago', 'Last paid order: %d days ago', $days_ago)}
{/if}
{else}
[`No paid orders yet`]
{/if}
{$orders_html|default:''}
[`Product reviews`]
{if $reviews}{sprintf('[`%s did not post any product reviews yet.`]', $contact_name)}
{/if}[`Affiliate program`]
{if !count($affiliate_history)}{sprintf('[`%s has no affiliate history yet.`]', $contact_name)}
{/if}- {if $customer && $customer.affiliate_bonus>=0}+{/if}{$customer.affiliate_bonus|default:'0'|wa_format_number:false}
- [`Add credit`]
- [`Add payout`]
| [`Credit`] | [`Debit`] | [`Balance`] | ||
|---|---|---|---|---|
| {if $h.order_id} [`Order`] {$wa->shop->orderId($h.order_id)} {/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} | {$h.create_datetime|wa_date:'humandatetime'} |