{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'seller-customers'} {/block} {block name="page-title"}{intl l='Customer'}{/block} {block name="check-resource"}admin.artabanmarketplace.owner{/block} {block name="check-access"}view{/block} {block name="main-content"}
{loop name="amp_seller_link_admin" type="amp_seller_link_admin" admin_id={admin attr="id"}} {loop name="customer" type="amp_seller_customer" current="false" amp_seller_id=$SELLER_ID id="$customer_id" backend_context="1" with_prev_next_info="true" lang="$edit_language_id"}
{intl l="Customer %firstname %lastname (Ref : %ref)" firstname={$FIRSTNAME} lastname={$LASTNAME} ref={$REF}}
{if $HAS_PREVIOUS != 0} {else} {/if} {if $HAS_NEXT != 0} {else} {/if}
{intl l="Customer informations"}

{intl l='Ref'} : {$REF}

{intl l='Title'} : {loop type="title" name="title1" id="$TITLE" backend_context="1"} {$LONG} {/loop}

{intl l='Firstname'} : {$FIRSTNAME}

{intl l='Lastname'} : {$LASTNAME}

{intl l='Email'} : {$EMAIL}

{loop name="addressDefaultPhone" type="address" customer="$customer_id" backend_context="1" default="1"} {if $PHONE}

{intl l='Phone'} : {$PHONE}

{/if} {if $CELLPHONE}

{intl l='Cellular phone'} : {$CELLPHONE}

{/if} {/loop}

{intl l="Addresses"}

{ifloop rel="addressDefault"}

{intl l="Default address"}
{loop name="addressDefault" type="address" customer="$customer_id" backend_context="1" default="1"}
{$LABEL}
{/loop}

{/ifloop} {ifloop rel="address"}

{intl l="Other addresses"}
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="0"}
{$LABEL}
{/loop}

{/ifloop} {elseloop rel="address"}
{intl l="This customer has not defined any delivery address"}
{/elseloop}
{intl l="orders for this customer"}

{intl l="Order n°"} | {intl l="Date & Hour"} | {intl l="Amount"} | {intl l="Status"} {hook name="customer.orders-table-header" location="orders_table_header" customer_id=$customer_id }
--- | --- | --- | ---
{loop type="ampseller_order" name="order-list" customer="{$customer_id}" amp_seller_id="$SELLER_ID" backend_context="1" status='*' page={$page_order} limit={config key="number_default_results_per_page.order_list" default=20}} {loop type="order-status" name="order-status" id=$STATUS} {assign "orderStatus" $TITLE} {assign "orderStatusLabel" "order_$CODE"} {/loop}
{$REF} | {format_date date=$CREATE_DATE} | {format_money number=$TOTAL_TAXED_AMOUNT} | {$orderStatus} {hook name="customer.orders-table-row" location="orders_table_row" customer_id=$customer_id order_id=$ID}
{/loop} {elseloop rel="order-list"}
{intl l="No orders fo this customer."}
{/elseloop}
{include file = "includes/pagination.html" page_param_name = "order_page" loop_ref = "order-list" max_page_count = 10 page_url = {url path="/admin/module/artabanmarketplace/seller/customer/%customer_id" customer_id=$customer_id page=$page} page_param_name = "page_order" }

{/loop} {elseloop rel="customer"}
{intl l="You are not allowed to view this customer or it doesnt exist"}
{/elseloop} {/loop}
{/block}