{** * 2007-2018 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA * @copyright 2007-2018 PrestaShop SA * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {extends file="helpers/view/view.tpl"} {block name="override_tpl"}
{*left*}
{$customer->firstname} {$customer->lastname} [{$customer->id|string_format:"%06d"}] - {$customer->email}

{if $gender->name}{$gender->name}{else}{l s='Unknown' d='Admin.Orderscustomers.Feature'}{/if}

{if isset($customer->birthday) && $customer->birthday != '0000-00-00'} {l s='%1$d years old (birth date: %2$s)' sprintf=[$customer_stats['age'], $customer_birthday] d='Admin.Orderscustomers.Feature'} {else} {l s='Unknown' d='Admin.Orderscustomers.Feature'} {/if}

{$registration_date}

{if $customer_stats['last_visit']}{$last_visit}{else}{l s='Never' d='Admin.Global'}{/if}

{if $count_better_customers != '-'}

{$count_better_customers}

{/if} {if $shop_is_feature_active}

{$name_shop}

{/if}

{if isset($customerLanguage)} {$customerLanguage->name} {else} {l s='Unknown' d='Admin.Orderscustomers.Feature'} {/if}

{if $customer->newsletter} {l s='Newsletter' d='Admin.Global'} {else} {l s='Newsletter' d='Admin.Global'} {/if}   {if $customer->optin} {l s='Partner offers' d='Admin.Orderscustomers.Feature'} {else} {l s='Partner offers' d='Admin.Orderscustomers.Feature'} {/if}

{$last_update}

{if $customer->active} {l s='Active' d='Admin.Global'} {else} {l s='Inactive' d='Admin.Global'} {/if}

{if $customer->isGuest()} {l s='This customer is registered as a Guest.' d='Admin.Orderscustomers.Feature'} {if !$customer_exists}

{l s='This feature generates a random password before sending an email to your customer.' d='Admin.Orderscustomers.Help'}
{else}

{l s='A registered customer account using the defined email address already exists. ' d='Admin.Orderscustomers.Notification'}

{/if} {/if}
{l s='Orders' d='Admin.Global'} {count($orders)}
{if $orders AND count($orders)} {assign var=count_ok value=count($orders_ok)} {assign var=count_ko value=count($orders_ko)}
{l s='Valid orders:'} {$count_ok} {l s='for a total amount of %s' sprintf=[$total_ok] d='Admin.Orderscustomers.Feature'}
{l s='Invalid orders:' d='Admin.Orderscustomers.Feature'} {$count_ko}
{if $count_ok} {foreach $orders_ok AS $key => $order} {/foreach}
{l s='ID' d='Admin.Global'} {l s='Date' d='Admin.Global'} {l s='Payment' d='Admin.Global'} {l s='Status' d='Admin.Global'} {l s='Products' d='Admin.Global'} {l s='Total spent' d='Admin.Orderscustomers.Feature'}
{$order['id_order']} {dateFormat date=$order['date_add'] full=0} {$order['payment']} {$order['order_state']} {$order['nb_products']} {$order['total_paid_real']} {l s='View' d='Admin.Actions'}
{/if} {if $count_ko} {foreach $orders_ko AS $key => $order} {/foreach}
{l s='ID' d='Admin.Global'} {l s='Date' d='Admin.Global'} {l s='Payment' d='Admin.Global'} {l s='Status' d='Admin.Global'} {l s='Products' d='Admin.Global'} {l s='Total spent' d='Admin.Orderscustomers.Feature'}
{$order['id_order']} {dateFormat date=$order['date_add'] full=0} {$order['payment']} {$order['order_state']} {$order['nb_products']} {$order['total_paid_real']}
{/if} {else}

{l s='%firstname% %lastname% has not placed any orders yet' sprintf=['%firstname%' => $customer->firstname, '%lastname%' => $customer->lastname] d='Admin.Orderscustomers.Feature'}

{/if}
{l s='Carts' d='Admin.Global'} {count($carts)}
{if $carts AND count($carts)} {foreach $carts AS $key => $cart} {/foreach}
{l s='ID' d='Admin.Global'} {l s='Date' d='Admin.Global'} {l s='Carrier' d='Admin.Global'} {l s='Total' d='Admin.Global'}
{$cart['id_cart']} {dateFormat date=$cart['date_upd'] full=0} {$cart['name']} {$cart['total_price']}
{else}

{l s='No cart is available' d='Admin.Orderscustomers.Notification'}

{/if}
{if $products AND count($products)}
{l s='Purchased products' d='Admin.Orderscustomers.Feature'} {count($products)}
{foreach $products AS $key => $product} {/foreach}
{l s='Date' d='Admin.Global'} {l s='Name' d='Admin.Global'} {l s='Quantity' d='Admin.Global'}
{dateFormat date=$product['date_add'] full=0} {$product['product_name']} {$product['product_quantity']}
{/if} {if count($interested)}
{l s='Viewed products' d='Admin.Orderscustomers.Feature'} {count($interested)}
{foreach $interested as $key => $p} {/foreach}
{l s='ID' d='Admin.Global'} {l s='Name' d='Admin.Global'}
{$p['id']} {$p['name']}
{/if}
{*right*}
{l s='Add a private note' d='Admin.Orderscustomers.Feature'}
{l s='This note will be displayed to all employees but not to customers.' d='Admin.Orderscustomers.Help'}
{l s='Messages' d='Admin.Global'} {count($messages)}
{if count($messages)} {foreach $messages AS $message} {/foreach}
{l s='Status' d='Admin.Global'} {l s='Message' d='Admin.Global'} {l s='Sent on' d='Admin.Orderscustomers.Feature'}
{$message['status']} {$message['message']}... {$message['date_add']}
{else}

{l s='%firstname% %lastname% has never contacted you' sprintf=['%firstname%' => $customer->firstname, '%lastname%' => $customer->lastname] d='Admin.Orderscustomers.Feature'}

{/if}
{l s='Vouchers' d='Admin.Orderscustomers.Feature'} {count($discounts)}
{if count($discounts)} {foreach $discounts AS $key => $discount} {/foreach}
{l s='ID' d='Admin.Global'} {l s='Code' d='Admin.Global'} {l s='Name' d='Admin.Global'} {l s='Status' d='Admin.Global'} {l s='Qty available' d='Admin.Orderscustomers.Feature'} {l s='Actions' d='Admin.Global'}
{$discount['id_cart_rule']} {$discount['code']} {$discount['name']} {if $discount['active']} {else} {/if} {if $discount['quantity'] > 0}{$discount['quantity_for_user']|intval}{else}0{/if}
{else}

{l s='%firstname% %lastname% has no discount vouchers' sprintf=['%firstname%' => $customer->firstname, '%lastname%' => $customer->lastname] d='Admin.Orderscustomers.Feature'}

{/if}
{if count($emails)}
{l s='Last emails' d='Admin.Orderscustomers.Feature'}
{foreach $emails as $email} {/foreach}
{l s='Date' d='Admin.Global'} {l s='Language' d='Admin.Global'} {l s='Subject' d='Admin.Global'} {l s='Template' d='Admin.Global'}
{dateFormat date=$email['date_add'] full=1} {$email['language']} {$email['subject']} {$email['template']}
{/if} {if count($connections)}
{l s='Last connections' d='Admin.Orderscustomers.Feature'}
{foreach $connections as $connection} {/foreach}
{l s='ID' d='Admin.Global'} {l s='Date' d='Admin.Global'} {l s='Pages viewed' d='Admin.Orderscustomers.Feature'} {l s='Total time' d='Admin.Orderscustomers.Feature'} {l s='Origin' d='Admin.Orderscustomers.Feature'} {l s='IP Address' d='Admin.Orderscustomers.Feature'}
{$connection['id_connections']} {dateFormat date=$connection['date_add'] full=0} {$connection['pages']} {$connection['time']} {$connection['http_referer']} {$connection['ipaddress']}
{/if}
{l s='Groups' d='Admin.Global'} {count($groups)} {l s='Edit' d='Admin.Actions'}
{if $groups AND count($groups)} {foreach $groups AS $key => $group} {/foreach}
{l s='ID' d='Admin.Global'} {l s='Name' d='Admin.Global'}
{$group['id_group']} {$group['name']}
{/if}
{if count($referrers)}
{l s='Referrers' d='Admin.Orderscustomers.Feature'}
{if $shop_is_feature_active}{/if} {foreach $referrers as $referrer} {if $shop_is_feature_active}{/if} {/foreach}
{l s='Date' d='Admin.Global'} {l s='Name' d='Admin.Global'}{l s='Shop' d='Admin.Global'}
{dateFormat date=$order['date_add'] full=0} {$referrer['name']}{$referrer['shop_name']}
{/if}
{* display hook specified to this page : AdminCustomers *} {hook h="displayAdminCustomers" id_customer=$customer->id|intval}
{l s='Addresses' d='Admin.Global'} {count($addresses)}
{if count($addresses)} {foreach $addresses AS $key => $address} {/foreach}
{l s='Company' d='Admin.Global'} {l s='Name' d='Admin.Global'} {l s='Address' d='Admin.Global'} {l s='Country' d='Admin.Global'} {l s='Phone number(s)' d='Admin.Orderscustomers.Feature'}
{if $address['company']}{$address['company']}{else}--{/if} {$address['firstname']} {$address['lastname']} {$address['address1']} {if $address['address2']}{$address['address2']}{/if} {$address['postcode']} {$address['city']} {$address['country']} {if $address['phone']} {$address['phone']} {if $address['phone_mobile']}
{$address['phone_mobile']}{/if} {else} {if $address['phone_mobile']}
{$address['phone_mobile']}{else}--{/if} {/if}
{l s='Edit' d='Admin.Actions'}
{else}

{l s='%firstname% %lastname% has not registered any addresses yet' sprintf=['%firstname%' => $customer->firstname, '%lastname%' => $customer->lastname]}

{/if}
{/block}