Merge branch 'ticket-AideContact-SAV' into develop

This commit is contained in:
Marion Muszynski 2016-11-02 17:04:16 +01:00
commit b915ed8649
5 changed files with 58 additions and 10 deletions

View File

@ -86,13 +86,13 @@ class AdminCustomerThreads extends AdminTab
'customer' => array('title' => $this->l('Customer'), 'width' => 100, 'filter_key' => 'customer', 'tmpTableFilter' => true),
'email' => array('title' => $this->l('E-mail'), 'width' => 100, 'filter_key' => 'a!email'),
'contact' => array('title' => $this->l('Type'), 'width' => 75, 'type' => 'select', 'select' => $contactArray, 'filter_key' => 'cl!id_contact', 'filter_type' => 'int', 'align' =>'text-bold'),
'language' => array('title' => $this->l('Language'), 'width' => 60, 'type' => 'select', 'select' => $languageArray, 'filter_key' => 'l!id_lang', 'filter_type' => 'int'),
'id_lang' => array('title' => $this->l('Language'), 'width' => 60, 'callback' => 'printCountry', 'type' => 'select', 'select' => $languageArray, 'filter_key' => 'l!id_lang', 'filter_type' => 'int', 'align'=>'center'),
'status' => array('title' => $this->l('Status'), 'width' => 50, 'type' => 'select', 'select' => $statusArray, 'anticon' => $anticonArray, 'align' => 'center', 'filter_key' => 'a!status', 'filter_type' => 'string'),
'employee' => array('title' => $this->l('Employee'), 'width' => 100, 'filter_key' => 'employee', 'tmpTableFilter' => true),
'id_product' => array('title' => $this->l('> 10€'), 'width' => 50, 'maxlength' => 0, 'align' =>'center'),
'id_order' => array('title' => $this->l('Nb products'), 'width' => 50, 'maxlength' => 0, 'align' =>'center text-bold'),
'id_order' => array('title' => $this->l('Nb products'), 'width' => 50, 'maxlength' => 0, 'align' =>'center text-bold','search'=>false),
'order' => array('title' => $this->l('Total cmd'), 'width' => 50, 'maxlength' => 0, 'align' =>'center text-bold'),
'date_upd' => array('title' => $this->l('Last message'), 'width' => 90)
'date_upd' => array('title' => $this->l('Last message'), 'width' => 50, 'type'=>'datetimeLight')
);
parent::__construct();
@ -605,6 +605,8 @@ class AdminCustomerThreads extends AdminTab
echo Tools::displayDate($tr[$key], (int)$cookie->id_lang);
elseif (isset($params['type']) AND $params['type'] == 'datetime')
echo Tools::displayDate($tr[$key], (int)$cookie->id_lang, true);
elseif (isset($params['type']) AND $params['type'] == 'datetimeLight')
echo date('d/m/Y H:i',strtotime($tr[$key]));
elseif (isset($tr[$key]))
{
$echo = ($key == 'price' ? round($tr[$key], 2) : isset($params['maxlength']) ? Tools::substr($tr[$key], 0, $params['maxlength']).'...' : $tr[$key]);

View File

@ -21,7 +21,9 @@ if ($cookie->isLogged() && Tools::getValue('id_order')) {
SELECT id_image
FROM '._DB_PREFIX_.'product_attribute_image
WHERE id_product_attribute = '.(int)($product['product_attribute_id']));
} elseif (isset($product['product_id']) AND (int)($product['product_id'])) {
}
if ((isset($product['product_id']) AND (int)($product['product_id'])) || !$image) {
$image = Db::getInstance()->getRow('
SELECT id_image
FROM '._DB_PREFIX_.'image

View File

@ -1,5 +1,20 @@
#module-ant_support_form-support #center_column form{
background: #ffffff url('/img/logo_2.png') no-repeat 360px 120px;
padding: 20px;
margin-bottom: 20px;
-moz-box-shadow: 2px 2px 5px #cccccc;
-webkit-box-shadow: 2px 2px 5px #cccccc;
-ms-box-shadow: 2px 2px 5px #cccccc;
-o-box-shadow: 2px 2px 5px #cccccc;
box-shadow: 2px 2px 5px #cccccc;
}
#module-ant_support_form-support #center_column form p.bold{
text-align: center;
font-size: 14px;
margin-bottom: 15px;
}
#module-ant_support_form-support #center_column textarea{
height: 150px;
padding: 5px;
width: 748px;
width: 700px;
}

View File

@ -16,9 +16,9 @@
<a href="{$base_dir}" class="button">{l s='Home' mod='ant_support_form'}</a>
</p>
{else}
<p class="bold">{l s='For questions about an order or for more information about our products' mod='ant_support_form'}.</p>
{include file="$tpl_dir./errors.tpl"}
<form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std" enctype="multipart/form-data">
<form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std" enctype="multipart/form-data" style="{if isset($site_version) && $site_version == 'es'}background: #ffffff url(/img/logo_3.png) no-repeat 360px {if !$allow_order}70px{else}145px{/if};{else}background: #ffffff url(/img/logo_2.png) no-repeat 360px {if !$allow_order}70px{else}145px{/if};{/if}">
<p class="bold">{l s='For questions about an order or for more information about our products' mod='ant_support_form'}.</p>
<fieldset>
<div class="content">
<p class="text">
@ -53,9 +53,7 @@
{if !isset($customerThread.id_product)}
<div id="products_part" class="text" style="display:none;">
<label for="id_products">{l s='Product' mod='ant_support_form'}</label>
<div id="products">
</div>
<div id="products"></div>
</div>
{literal}<script>
$(function() {
@ -157,6 +155,8 @@
{elseif isset($id_reason)}
<input type="hidden" name='id_reason' value="{$id_reason}">
{/if}
</fieldset>
<fieldset>
<p class="textarea">
<label for="message">{l s='Message' mod='ant_support_form'}</label>
<textarea id="message" name="message">{if isset($message)}{$message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea>

View File

@ -0,0 +1,29 @@
<?php
class CustomerThread extends CustomerThreadCore
{
public function printCountry($value, $params)
{
switch ($value) {
case '1':
$flag = 17;
break;
case '2':
$flag = 8;
break;
case '3':
$flag = 6;
break;
case '4':
$flag = 1;
break;
case '5':
$flag = 10;
break;
default:
$flag = 8;
break;
}
return '<img src="/img/flags/'.(int) $flag.'.png" alt="" />';
}
}