first commit

This commit is contained in:
2024-11-05 12:22:50 +01:00
commit e5682a3912
19641 changed files with 2948548 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../../');
exit;

View File

@@ -0,0 +1,89 @@
{**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*}
{extends file="helpers/list/list_header.tpl"}
{block name="leadin"}
<div id="CustomerThreadContacts" class="row">
{assign var=nb_categories value=count($categories)}
{foreach $categories as $key => $val}
{assign var=total_thread value=0}
{assign var=id_customer_thread value=0}
{foreach $contacts as $tmp => $tmp2}
{if $val.id_contact == $tmp2.id_contact}
{assign var=total_thread value=$tmp2.total}
{assign var=id_customer_thread value=$tmp2.id_customer_thread}
{/if}
{/foreach}
<div class="col-lg-3">
<div class="panel">
<div class="panel-heading">
{$val.name}
</div>
{if $nb_categories < 6}
<p>{$val.description}</p>
{/if}
{if $total_thread == 0}
<span class="message-mail">{l s='No new messages' d='Admin.Orderscustomers.Feature'}</span>
{else}
<a href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;id_customer_thread={$id_customer_thread}&amp;viewcustomer_thread" class="button">
{$total_thread}
{if $total_thread > 1}{l s='New messages' d='Admin.Orderscustomers.Feature'}{else}{l s='New message' d='Admin.Orderscustomers.Feature'}{/if}
</a>
{/if}
</div>
</div>
{/foreach}
<div class="col-lg-3">
<div id="MeaningStatus" class="panel">
<div class="panel-heading">
{l s='Meaning of status' d='Admin.Orderscustomers.Feature'}
</div>
<ul class="list-unstyled">
<li class="text-success"><i class="icon-circle"></i> {l s='Open' d='Admin.Orderscustomers.Feature'}</li>
<li class="text-danger"><i class="icon-circle"></i> {l s='Closed' d='Admin.Orderscustomers.Feature'}</li>
<li class="text-warning"><i class="icon-circle"></i> {l s='Pending 1' d='Admin.Orderscustomers.Feature'}</li>
<li class="text-warning"><i class="icon-circle"></i> {l s='Pending 2' d='Admin.Orderscustomers.Feature'}</li>
</ul>
</div>
</div>
<div class="col-lg-3">
<div id="CustomerService" class="panel">
<div class="panel-heading">
{l s='Statistics' d='Admin.Orderscustomers.Feature'}
</div>
<ul class="list-unstyled">
{assign var=count value=0}
{foreach $params as $key => $val}
{assign var=count value=$count+1}
<li>{$key} <span class="badge">{$val}</span></li>
{/foreach}
</ul>
</div>
</div>
</div>
{/block}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../../');
exit;

View File

@@ -0,0 +1,94 @@
{**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*}
{extends file="helpers/options/options.tpl"}
{block name="after"}
{if $use_sync}
<div class="panel">
<legend>{l s='Sync' d='Admin.Orderscustomers.Feature'}</legend>
<label>{l s='Run sync:' d='Admin.Orderscustomers.Feature'}</label>
<div class="margin-form">
<button class="btn" id="run_sync" onclick="run_sync();">{l s='Run sync' d='Admin.Orderscustomers.Feature'}</button>
<p>{l s='Click to synchronize mail automatically' d='Admin.Orderscustomers.Feature'}</p>
<div id="ajax_loader"></div>
<div class="error" style="display:none" id="ajax_error"></div>
<div class="alert" style="display:none" id="ajax_conf"></div>
</div>
</div>
<script type="text/javascript">
var ajaxQueries = new Array();
function run_sync()
{
$('#ajax_error').html('');
$('#ajax_error').hide();
$('#ajax_conf').html('');
$('#ajax_conf').hide();
for(i = 0; i < ajaxQueries.length; i++)
ajaxQueries[i].abort();
ajaxQueries = new Array();
$('#ajax_loader').html('<img src="{$smarty.const._PS_ADMIN_IMG_}ajax-loader.gif">');
ajaxQuery = $.ajax({
type: "POST",
url: "index.php",
data: {
ajax: "1",
token: "{$token|escape:'html':'UTF-8'}",
syncImapMail: "1",
ajax:"1",
action:"syncImap",
tab:"AdminCustomerThreads"
},
dataType : "json",
success: function(jsonData) {
jsonError = '';
if (jsonData.hasError)
{
for (i=0;i < jsonData.errors.length;i++)
jsonError = jsonError+'<li>'+jsonData.errors[i]+'</li>';
$('#ajax_error').html('<ul>'+jsonError+'</ul>');
$('#ajax_error').fadeIn();
}
else
{
jsonError = '<li>{l s='Sync success'}</li>';
for (i=0;i < jsonData.errors.length;i++)
jsonError = jsonError+'<li>'+jsonData.errors[i]+'</li>';
$('#ajax_conf').html('<ul>'+jsonError+'</ul>');
$('#ajax_conf').fadeIn();
}
$('#ajax_loader').html('');
},
error: function(XMLHttpRequest, textStatus, errorThrown)
{
jAlert("TECHNICAL ERROR: unable to sync.\n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
}
});
ajaxQueries.push(ajaxQuery);
};
</script>
{/if}
{/block}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../../');
exit;

View File

@@ -0,0 +1,60 @@
{**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*}
{if !$message.id_employee}
{assign var="type" value="customer"}
{else}
{assign var="type" value="employee"}
{/if}
<div class="message-item{if $initial}-initial-body{/if}">
{if !$initial}
<div class="message-avatar">
<div class="avatar-md">
{if $type == 'customer'}
<i class="icon-user icon-3x"></i>
{else}
{if isset($current_employee->firstname)}<img src="{$message.employee_image}" alt="{$current_employee->firstname|escape:'html':'UTF-8'}" />{/if}
{/if}
</div>
</div>
{/if}
<div class="message-body">
{if !$initial}
<h4 class="message-item-heading">
<i class="icon-mail-reply text-muted"></i>
{if $type == 'customer'}
{$message.customer_name|escape:'html':'UTF-8'}
{else}
{$message.employee_name|escape:'html':'UTF-8'}
{/if}
</h4>
{/if}
<span class="message-date">&nbsp;<i class="icon-calendar"></i> - {dateFormat date=$message.date_add full=0} - <i class="icon-time"></i> {$message.date_add|substr:11:5}</span>
{if isset($message.file_name)} <span class="message-product">&nbsp;<i class="icon-link"></i> <a href="{$message.file_name|escape:'html':'UTF-8'}" target="_blank" rel="noopener noreferrer nofollow">{l s="Attachment" d='Admin.Catalog.Feature'}</a></span>{/if}
{if isset($message.product_name)} <span class="message-attachment">&nbsp;<i class="icon-book"></i> <a href="{$message.product_link|escape:'html':'UTF-8'}" target="_blank" rel="noopener noreferrer nofollow">{l s="Product" d='Admin.Global'} {$message.product_name|escape:'html':'UTF-8'} </a></span>{/if}
<p class="message-item-text">{$message.message|escape:'html':'UTF-8'|nl2br}</p>
</div>
</div>

View File

@@ -0,0 +1,76 @@
{**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*}
<form action="{$link->getAdminLink('AdminCustomerThreads', true, [], ['id_customer_thread' => $id_customer_thread|intval, 'viewcustomer_thread' => 1])|escape:'html':'UTF-8'}" method="post" enctype="multipart/form-data" class="form-horizontal">
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">{l s="Forward this discussion" d='Admin.Orderscustomers.Feature'}</h4>
</div>
<div class="modal-body">
<div class="row row-margin-bottom">
<label class="control-label col-lg-6">{l s='Forward this discussion to an employee:' d='Admin.Orderscustomers.Feature'}</label>
<div class="col-lg-3">
<select name="id_employee_forward">
<option value="-1">{l s='-- Choose --' d='Admin.Actions'}</option>
{foreach $employees as $employee}
<option value="{$employee.id_employee}"> {Tools::substr($employee.firstname, 0, 1)}. {$employee.lastname}</option>
{/foreach}
<option value="0">{l s='Someone else' d='Admin.Orderscustomers.Feature'}</option>
</select>
</div>
</div>
<div id="message_forward_email" class="row row-margin-bottom" style="display:none">
<label class="control-label col-lg-3">{l s='Email' d='Admin.Global'}</label>
<div class="col-lg-3">
<input type="email" name="email" />
</div>
</div>
<div id="message_forward" style="display:none;">
<div class="row row-margin-bottom">
<label class="control-label col-lg-3">{l s='Comment:' d='Admin.Orderscustomers.Feature'}</label>
<div class="col-lg-7">
<textarea name="message_forward" rows="6">{l s='You can add a comment here.' d='Admin.Orderscustomers.Help'}</textarea>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{l s="Close"}</button>
<button type="submit" class="btn btn-primary" name="submitForward" disabled="disabled"><i class="icon-mail-forward"></i> {l s="Forward" d='Admin.Orderscustomers.Feature'}</button>
</div>
</div>
</div>
</div>
</form>
<script type="text/javascript">
$("select[name='id_employee_forward']").on('change', function() {
if ($(this).val() != '-1')
$("button[name='submitForward']").prop('disabled', false);
else
$("button[name='submitForward']").prop('disabled', 'disabled');
});
</script>

View File

@@ -0,0 +1,39 @@
{**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*}
<article class="timeline-item{if isset($timeline_item.alt)} alt{/if}">
<div class="timeline-caption">
<div class="timeline-panel arrow arrow-{$timeline_item.arrow}">
<span class="timeline-icon" style="background-color:{$timeline_item.background_color|escape:'html':'UTF-8'};">
<i class="{$timeline_item.icon}"></i>
</span>
<span class="timeline-date"><i class="icon-calendar"></i> {dateFormat date=$timeline_item.date full=0} - <i class="icon-time"></i> {$timeline_item.date|substr:11:5}</span>
{if isset($timeline_item.id_order)}<a class="badge" href="#">{l s="Order #" d='Admin.Orderscustomers.Feature'}{$timeline_item.id_order|intval}</a><br/>{/if}
<span>{$timeline_item.content|nl2br}</span>
{if isset($timeline_item.see_more_link)}
<br/><br/><a href="{$timeline_item.see_more_link|escape:'html':'UTF-8'}" class="btn btn-default _blank">{l s="See more" d='Admin.Orderscustomers.Feature'}</a>
{/if}
</div>
</div>
</article>

View File

@@ -0,0 +1,184 @@
{**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*}
{extends file="helpers/view/view.tpl"}
{block name="override_tpl"}
{include file="./modal.tpl" }
<div class="panel">
<div class="panel-heading">
<i class="icon-comments"></i>
{l s="Thread" d='Admin.Orderscustomers.Feature'}: <span class="badge">#{$id_customer_thread|intval}</span>
{if isset($next_thread) && $next_thread}
<a class="btn btn-default pull-right" href="{$next_thread.href|escape:'html':'UTF-8'}">
{$next_thread.name} <i class="icon-forward"></i>
</a>
{/if}
</div>
<div class="well">
<form action="{$link->getAdminLink('AdminCustomerThreads', true, [], ['id_customer_thread' => $id_customer_thread|intval, 'viewcustomer_thread' => 1])|escape:'html':'UTF-8'}" method="post" enctype="multipart/form-data" class="form-horizontal">
{foreach $actions as $action}
<button class="btn btn-default" name="{$action.name|escape:'html':'UTF-8'}" value="{$action.value|intval}">
{if isset($action.icon)}<i class="{$action.icon|escape:'html':'UTF-8'}"></i>{/if}{$action.label}
</button>
{/foreach}
<button class="btn btn-default" type="button" data-toggle="modal" data-target="#myModal">
{l s="Forward this discussion to another employee" d='Admin.Orderscustomers.Feature'}
</button>
</form>
</div>
<div class="row">
<div class="message-item-initial media">
<a href="{if isset($customer->id)}{$link->getAdminLink('AdminCustomers', true, [], ['id_customer' => $customer->id|intval, 'viewcustomer' => 1])|escape:'html':'UTF-8'}{else}#{/if}" class="avatar-lg pull-left"><i class="icon-user icon-3x"></i></a>
<div class="media-body">
<div class="row">
<div class="col-sm-6">
{if isset($customer->firstname)}
<h2>
<a href="{$link->getAdminLink('AdminCustomers', true, [], ['id_customer' => $customer->id|intval, 'viewcustomer' => 1])|escape:'html':'UTF-8'}">
{$customer->firstname|escape:'html':'UTF-8'} {$customer->lastname|escape:'html':'UTF-8'} <small>({$customer->email|escape:'html':'UTF-8'})</small>
</a>
</h2>
{else}
<h2>{$thread->email|escape:'html':'UTF-8'}</h2>
{/if}
{if isset($contact) && trim($contact) != ''}
<span>{l s="To:" d='Admin.Orderscustomers.Feature'} </span><span class="badge">{$contact|escape:'html':'UTF-8'}</span>
{/if}
</div>
{if isset($customer->firstname)}
<div class="col-sm-6">
<p>
{if $count_ok}
{l s='[1]%count%[/1] order(s) validated for a total amount of [2]%total%[/2]' html=true sprintf=['%count%' => $count_ok, '%total%' => $total_ok, '[1]' => '<span class="badge">', '[/1]' => '</span>', '[2]' => '<span class="badge badge-success">', '[/2]' => '</span>'] d='Admin.Orderscustomers.Feature'}
{else}
{l s="No orders validated for the moment" d='Admin.Orderscustomers.Feature'}
{/if}
</p>
<p class="text-muted">{l s="Customer since: %s" sprintf=[{dateFormat date=$customer->date_add full=0}] d='Admin.Orderscustomers.Feature'}</p>
</div>
{/if}
</div>
<div class="row">
<div class="col-sm-12">
{if !$first_message.id_employee}
{include file="./message.tpl" message=$first_message initial=true}
{/if}
</div>
</div>
</div>
</div>
</div>
<div class="row">
{foreach $messages as $message}
{include file="./message.tpl" message=$message initial=false}
{/foreach}
</div>
</div>
<div class="panel">
<h3 id="reply-form-title">{l s="Your answer to" d='Admin.Orderscustomers.Feature'} {if isset($customer->firstname)}{$customer->firstname|escape:'html':'UTF-8'} {$customer->lastname|escape:'html':'UTF-8'} {else} {$thread->email}{/if}</h3>
<form action="{$link->getAdminLink('AdminCustomerThreads', true, [], ['id_customer_thread' => $thread->id|intval, 'viewcustomer_thread' => 1])|escape:'html':'UTF-8'}" method="post" enctype="multipart/form-data" class="form-horizontal">
<div class="row">
<div class="media">
<div class="pull-left">
<span class="avatar-md">{if isset($current_employee->firstname)}<img src="{$current_employee->getImage()}" alt="">{/if}</span>
</div>
<div class="media-body">
<textarea id="reply_message" cols="30" rows="7" name="reply_message">{$PS_CUSTOMER_SERVICE_SIGNATURE|escape:'html':'UTF-8'}</textarea>
</div>
</div>
</div>
<div class="panel-footer">
<!--
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="icon-magic icon-2x"></i><br>
{l s="Choose a template"}
</button>
-->
<button class="btn btn-default pull-right" name="submitReply"><i class="process-icon-mail-reply"></i> {l s="Send"}</button>
<input type="hidden" name="id_customer_thread" value="{$thread->id|intval}" />
<input type="hidden" name="msg_email" value="{$thread->email}" />
</div>
</form>
</div>
{if count($timeline_items)}
<div class="panel" id="orders-and-messages-block">
<h3>
<i class="icon-clock-o"></i>
{l s="Orders and messages timeline" d='Admin.Orderscustomers.Feature'}
</h3>
<div class="timeline">
{foreach $timeline_items as $dates}
{foreach from=$dates key=date item=timeline_item}
{include file="controllers/customer_threads/helpers/view/timeline_item.tpl" timeline_item=$timeline_item}
{/foreach}
{/foreach}
</div>
</div>
{/if}
<script type="text/javascript">
var timer;
$(document).ready(function(){
$('select[name=id_employee_forward]').change(function(){
if ($(this).val() >= 0)
$('#message_forward').show(400);
else
$('#message_forward').hide(200);
if ($(this).val() == 0)
$('#message_forward_email').show(200);
else
$('#message_forward_email').hide(200);
});
$('textarea[name=message_forward]').click(function(){
if($(this).val() == '{l s='You can add a comment here.'}')
{
$(this).val('');
}
});
timer = setInterval("markAsRead()", 3000);
});
function markAsRead()
{
$.ajax({
type: 'POST',
url: 'ajax-tab.php',
async: true,
dataType: 'json',
data: {
controller: 'AdminCustomerThreads',
action: 'markAsRead',
token : '{$token|escape:'html':'UTF-8'}',
id_thread: {$id_customer_thread}
}
});
clearInterval(timer);
timer = null;
}
</script>
{/block}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../');
exit;

View File

@@ -0,0 +1,200 @@
{**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*}
{if !$email}
<div class="panel">
<h3>
{if !empty($message.employee_name)}
<i>{$employee_avatar}</i>
({$message.employee_name}) - {$PS_SHOP_NAME}
{else}
<i class="icon-user"></i>
{if !empty($message.id_customer)}
<a href="index.php?tab=AdminCustomers&amp;id_customer={$message.id_customer}&amp;viewcustomer&amp;token={getAdminToken tab='AdminCustomers'}" title="{l s='View customer' d='Admin.Orderscustomers.Feature'}">
{$message.customer_name}
</a>
{else}
{$message.email}
{/if}
{/if}
</h3>
<div class="infoCustomer">
{if !empty($message.id_customer) && empty($message.id_employee)}
<dl class="dl-horizontal">
<dt>{l s='Customer ID:' d='Admin.Orderscustomers.Feature'}</dt>
<dd>
<a href="index.php?tab=AdminCustomers&amp;id_customer={$message.id_customer}&amp;viewcustomer&amp;token={getAdminToken tab='AdminCustomers'}" title="{l s='View customer' d='Admin.Orderscustomers.Feature'}">
{$message.id_customer} <i class="icon-search"></i>
</a>
</dd>
</dl>
{/if}
<dl class="dl-horizontal">
<dt>{l s='Sent on:' d='Admin.Orderscustomers.Feature'}</dt>
<dd>{$message.date_add}&nbsp;</dd>
</dl>
{if empty($message.id_employee)}
<dl class="dl-horizontal">
<dt>{l s='Browser:' d='Admin.Orderscustomers.Feature'}</dt>
<dd>{$message.user_agent}&nbsp;</dd>
</dl>
{/if}
{if !empty($message.file_name) && $file_name}
<dl class="dl-horizontal">
<dt>{l s='File attachment' d='Admin.Orderscustomers.Feature'}</dt>
<dd>
<a href="index.php?tab=AdminCustomerThreads&amp;id_customer_thread={$message.id_customer_thread}&amp;viewcustomer_thread&amp;token={getAdminToken tab='AdminCustomerThreads'}&amp;filename={$message.file_name}"
title="{l s='View file' d='Admin.Orderscustomers.Feature'}">
<i class="icon-search"></i>
</a>
</dd>
</dl>
{/if}
{if !empty($message.id_order) && $is_valid_order_id && empty($message.id_employee)}
<dl class="dl-horizontal">
<dt>{l s='Order #' d='Admin.Orderscustomers.Feature'}</dt>
<dd><a href="index.php?tab=AdminOrders&amp;id_order={$message.id_order}&amp;vieworder&amp;token={getAdminToken tab='AdminOrders'}" title="{l s='View order' d='Admin.Orderscustomers.Feature'}">{$message.id_order} <img src="../img/admin/search.gif" alt="{l s='View' d='Admin.Actions'}" /></a>
</dd>
</dl>
{/if}
{if !empty($message.id_product) && empty($message.id_employee)}
<dl class="dl-horizontal">
<dt>{l s='Product #' d='Admin.Orderscustomers.Feature'}</dt>
<dd><a href="{$link->getAdminLink('AdminProducts', true, ['id_product' => $message.id_product, 'updateproduct' => '1'])|escape:'html':'UTF-8'}" title="{l s='View order' d='Admin.Orderscustomers.Feature'}">{$message.id_product} <img src="../img/admin/search.gif" alt="{l s='View' d='Admin.Actions'}" /></a></dd>
</dl>
{/if}
<form class="form-inline" action="{$current|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;id_customer_thread={$message.id_customer_thread}&amp;viewcustomer_thread" method="post" >
<input type="hidden" name="id_customer_message" value="{$message.id_customer_message}" />
<div class="form-group">
<dl class="dl-horizontal">
<dt>{l s='Subject:' d='Admin.Global'}</dt>
<dd>
<select name="id_contact" class="fixed-width-lg" onchange="this.form.submit();">
{foreach $contacts as $contact}
<option value="{$contact.id_contact}" {if $contact.id_contact == $message.id_contact}selected="selected"{/if}>
{$contact.name}
</option>
{/foreach}
</select>
</dd>
</dl>
</div>
</form>
</div>
{else}
<div class="infoEmployee">
{if $id_employee}
<a class="btn btn-default pull-right" href="{$thread_url}">
{l s='View this thread' d='Admin.Orderscustomers.Feature'}
</a>
{/if}
<dl class="dl-horizontal">
<dt>{l s='Sent by:' d='Admin.Orderscustomers.Feature'}</dt>
<dd>
{if !empty($message.customer_name)}
{$message.customer_name} ({$message.email})
{else}
{$message.email}
{/if}
</dd>
</dl>
{if !empty($message.id_customer) && empty($message.id_employee)}
<!--<dl class="dl-horizontal">
<dt>{l s='Customer ID:'}</dt>
<dd>{$message.id_customer}</dd>
</dl>-->
{/if}
{if !empty($message.id_order) && empty($message.id_employee)}
<!--<dl class="dl-horizontal">
<dt>{l s='Order #'}:</dt>
<dd>{$message.id_order}</dd>
</dl>-->
{/if}
{if !empty($message.id_product) && empty($message.id_employee)}
<!--<dl class="dl-horizontal">
<dt>{l s='Product #'}:</dt>
<dd>{$message.id_product}</dd>
</dl>-->
{/if}
<!--<dl class="dl-horizontal">
<dt>{l s='Subject:'}</dt>
<dd>{$message.subject}</dd>
</dl>-->
{/if}
{if !$email}
<dl class="dl-horizontal">
<dt>{l s='Thread ID:' d='Admin.Orderscustomers.Feature'}</dt>
<dd>{$message.id_customer_thread}</dd>
</dl>
<dl class="dl-horizontal">
<dt>{l s='Message ID:' d='Admin.Orderscustomers.Feature'}</dt>
<dd>{$message.id_customer_message}</dd>
</dl>
{/if}
<dl class="dl-horizontal">
<dt>{l s='Message:' d='Admin.Orderscustomers.Feature'}</dt>
<dd>{$message.message|escape:'html':'UTF-8'|nl2br}</dd>
</dl>
</div>
{if !$email}
</div>
{if empty($message.id_employee)}
<div class="panel">
<button class="btn btn-default"
onclick="$('#reply_to_{$message.id_customer_message}').show(500); $(this).parent().hide();">
<i class="icon-mail-reply"></i> {l s='Reply to this message' d='Admin.Orderscustomers.Feature'}
</button>
</div>
{/if}
<div id="reply_to_{$message.id_customer_message}" style="display: none;">
<div class="panel">
<form action="{$current|escape:'html':'UTF-8'}&amp;token={getAdminToken tab='AdminCustomerThreads'}&amp;id_customer_thread={$message.id_customer_thread|intval}&amp;viewcustomer_thread=1" method="post" enctype="multipart/form-data" class="form-horizontal">
<div class="panel-heading">
{l s='Please type your reply below:' d='Admin.Orderscustomers.Feature'}
</div>
<div class="row row-margin-bottom">
<textarea class="col-lg-12" rows="6" name="reply_message">{$PS_CUSTOMER_SERVICE_SIGNATURE}</textarea>
</div>
<div class="row">
<p class="pull-right">{l s='Your reply will be sent to:' d='Admin.Orderscustomers.Feature'} {$message.email}</p>
</div>
<div class="row row-margin-bottom">
<input type="file" name="joinFile"/>
</div>
<div class="row">
<button type="submit" class="btn btn-default" name="submitReply">
<i class="icon-check"></i> {l s='Send my reply' d='Admin.Orderscustomers.Feature'}</button>
<input type="hidden" name="id_customer_thread" value="{$message.id_customer_thread|intval}" />
<input type="hidden" name="msg_email" value="{$message.email}" />
</div>
</form>
</div>
</div>
{/if}