{if $searchTerm|strlen > 2}
{* customer search *}
{intl l='Customer'}
{ifloop rel="customer_list"}
{intl l="customer ref"}
|
{intl l="company"}
|
{intl l="firstname & lastname"}
|
{intl l="Email address"}
|
{hook name="customers.header" location="customer_list_header" }
{intl l="last order"}
|
{intl l='order amount'} |
{intl l="Actions"} |
{loop name="customer_list" type="customer" current="false" visible="*" backend_context="1" search_term=$searchTerm search_in="ref,firstname,lastname,email" limit=26}
{assign "lastOrderDate" ''}
{assign "lastOrderAmount" ''}
{assign "lastOrderCurrency" ''}
{$hasOrders = false}
{loop type="order" name="last-order" customer=$ID order="create-date-reverse" limit="1"}
{assign "lastOrderDate" "{format_date date=$CREATE_DATE}"}
{assign "lastOrderAmount" "{format_number number=$TOTAL_TAXED_AMOUNT}"}
{loop type="currency" name="order-currency" id=$CURRENCY}
{assign "lastOrderCurrency" $SYMBOL}
{/loop}
{$hasOrders = true}
{/loop}
{if $LOOP_COUNT < 26}
{$REF} |
{$COMPANY}
|
{$FIRSTNAME} {$LASTNAME}
|
{mailto address="{$EMAIL}" encode="hex"}
|
{hook name="customers.row" location="customer_list_row" }
{$lastOrderDate}
|
{$lastOrderCurrency} {$lastOrderAmount}
|
|
{else}
{$smarty.capture.more_results nofilter}
{/if}
{/loop}
{/ifloop}
{elseloop rel="customer_list"}
{intl l="No customer found for \"%term\"" term=$searchTerm}
{/elseloop}
{* end customer search *}
{* order search *}
{intl l='Orders'}
{ifloop rel="order-search"}
{intl l="Order n°"} |
{intl l="Date & Hour"} |
{intl l="Invoice"} |
{intl l="Delivery"} |
{intl l="Transaction"} |
{intl l="Company"} |
{intl l="Name"} |
{intl l="Amount"} |
{intl l="Status"} |
{intl l="Actions"} |
{loop type="order" name="order-search" backend_context=1 customer="*" search_term=$searchTerm search_in="ref,customer_ref,customer_firstname,customer_lastname,customer_email,invoice_ref,transaction_ref,delivery_ref" limit=26}
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
{assign "orderInvoiceFirstName" $FIRSTNAME}
{assign "orderInvoiceLastName" $LASTNAME}
{assign "orderInvoiceCompany" $COMPANY}
{/loop}
{loop type="order-status" name="order-status" id=$STATUS}
{assign "orderStatus" $TITLE}
{assign "orderStatusLabel" "order_$CODE"}
{/loop}
{loop type="currency" name="order-currency" id=$CURRENCY}
{assign "currencySymbol" $SYMBOL}
{/loop}
{if $LOOP_COUNT < 26}
{$REF} |
{format_date date=$CREATE_DATE} |
{$INVOICE_REF} |
{$DELIVERY_REF} |
{$TRANSACTION_REF} |
{$orderInvoiceCompany} |
{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper} |
{format_money number=$TOTAL_TAXED_AMOUNT symbol=$currencySymbol} |
{$orderStatus} |
|
{else}
{$smarty.capture.more_results nofilter}
{/if}
{/loop}
{/ifloop}
{elseloop rel="order-search"}
{intl l="No order found for \"%term\"" term=$searchTerm}
{/elseloop}
{* end order search *}
{* category search *}
{elseloop rel="category-search"}
{intl l="No category found for \"%term\"" term=$searchTerm}
{/elseloop}
{* end category search *}
{* product search *}
{elseloop rel="product-search"}
{intl l="No product found for \"%term\"" term=$searchTerm}
{/elseloop}
{* end product search *}
{* folder search *}
{elseloop rel="folder-search"}
{intl l="No folder found for \"%term\"" term=$searchTerm}
{/elseloop}
{* end folder search *}
{* content search *}
{elseloop rel="content-search"}
{intl l="No content found for \"%term\"" term=$searchTerm}
{/elseloop}
{* end content search *}
{else}
{intl l="Your search is too short"}
{/if}