Merge branch 'ticket-AideContact-SAV' into develop
This commit is contained in:
commit
82558bd166
@ -514,7 +514,7 @@ class AdminCustomerThreads extends AdminTab
|
||||
if ($key == 'id_product' AND isset($tr[$key]) AND isset($tr['id_order'])) {
|
||||
$order = new Order((int)$tr['id_order']);
|
||||
$cart = new Cart((int)$order->id_cart);
|
||||
$products = DB::getInstance()->executeS('
|
||||
$products = Db::getInstance()->executeS('
|
||||
SELECT * FROM `'._DB_PREFIX_.'support_product_customerthread`
|
||||
WHERE `id_customer_thread` = '.(int)$tr['id_customer_thread']
|
||||
);
|
||||
@ -522,7 +522,9 @@ class AdminCustomerThreads extends AdminTab
|
||||
$supTo100 = 0;
|
||||
if(!empty($products)) {
|
||||
foreach ($products as $product) {
|
||||
$tax_rate = Tax::getProductTaxRate((int)$product['id_product'], (int)($cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}));
|
||||
$price = Product::getPriceStatic((int)$product['id_product'], false, (int)$product['id_product_attribute'], 6, NULL, false, true, 1, false, ((int)($tr['id_customer']) ? (int)($tr['id_customer']) : NULL), (int)($order->id_cart), ((int)($cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}) ? (int)($cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}) : NULL), $specificPriceOutput);
|
||||
$price = Tools::ps_round($price * (1 + (float)($tax_rate) / 100), 2);
|
||||
if($price>10){
|
||||
$supTo10++;
|
||||
}
|
||||
@ -682,28 +684,64 @@ class AdminCustomerThreads extends AdminTab
|
||||
?'<a onclick="$(\'#info_'.(int)$message['id_customer_message'].'\').toggle();"><span class="anticon anticon-info"></span></a>'
|
||||
:'').'
|
||||
</div>
|
||||
</div>
|
||||
'.(empty($message['employee_name'])?'
|
||||
<div class="more-info" id="info_'.(int)$message['id_customer_message'].'"" style="font-size:11px">
|
||||
<h4><span class="anticon anticon-info"></span> '.$this->l('Informations').'</h4>
|
||||
<ul>'.(empty($message['employee_name'])
|
||||
? '<li><span class="anticon anticon-sphere"></span> '.strip_tags($message['user_agent']).'</li>'
|
||||
: ''
|
||||
).(
|
||||
(!empty($message['id_order']) AND empty($message['employee_name']))
|
||||
? '<li><b>'.$this->l('Order #').'</b> <a href="index.php?tab=AdminOrders&id_order='.(int)($message['id_order']).'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)).'" title="'.$this->l('View order').'">'.(int)($message['id_order']).' <span class="anticon anticon-eye"></span></a></li>'
|
||||
: ''
|
||||
).(
|
||||
(!empty($message['id_product']) AND empty($message['employee_name']))
|
||||
? '<li><b>'.$this->l('Product #').'</b> <a href="index.php?tab=AdminOrders&id_order='.(int)($id_order_product).'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)).'" title="'.$this->l('View order').'">'.(int)($message['id_product']).' <span class="anticon anticon-eye"></span></a></li>'
|
||||
: ''
|
||||
).'
|
||||
<li><b>'.$this->l('Thread ID:').'</b> '.(int)$message['id_customer_thread'].'</li>
|
||||
<li><b>'.$this->l('Message ID:').'</b> '.(int)$message['id_customer_message'].'</li>
|
||||
</ul>
|
||||
</div>'
|
||||
:'').'
|
||||
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
</div>';
|
||||
|
||||
if(empty($message['employee_name'])){
|
||||
$output .='
|
||||
<div class="more-info" id="info_'.(int)$message['id_customer_message'].'"" style="font-size:11px">
|
||||
<h4><span class="anticon anticon-info"></span> '.$this->l('Informations').'</h4>
|
||||
<ul>';
|
||||
if(empty($message['employee_name'])) {
|
||||
$output .= '<li><span class="anticon anticon-sphere"></span> '.strip_tags($message['user_agent']).'</li>';
|
||||
}
|
||||
|
||||
$output .= '<li><b>'.$this->l('Thread ID:').'</b> '.(int)$message['id_customer_thread'].'</li>
|
||||
<li><b>'.$this->l('Message ID:').'</b> '.(int)$message['id_customer_message'].'</li>';
|
||||
|
||||
if(!empty($message['id_order']) AND empty($message['employee_name'])) {
|
||||
$output .= '<li><b>'.$this->l('Order #').'</b> <a href="index.php?tab=AdminOrders&id_order='.(int)($message['id_order']).'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)).'" title="'.$this->l('View order').'">'.(int)($message['id_order']).' <span class="anticon anticon-eye"></span></a></li>';
|
||||
}
|
||||
if(!empty($message['id_product']) && empty($message['employee_name'])){
|
||||
$products = Db::getInstance()->ExecuteS('
|
||||
SELECT spc.*, pl.`name`
|
||||
FROM `'._DB_PREFIX_.'support_product_customerthread` spc
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = spc.`id_product`)
|
||||
WHERE spc.`id_customer_thread` = '.(int)$message['id_customer_thread'].'
|
||||
AND pl.`id_lang` = 2'
|
||||
);
|
||||
$output .= '
|
||||
<li>
|
||||
<p><b>'.$this->l('Chosen Products:').'</b></p>';
|
||||
foreach ($products as $key => $product) {
|
||||
$img_path = '';
|
||||
$img = Db::getInstance()->getRow('
|
||||
SELECT id_image
|
||||
FROM `'._DB_PREFIX_.'image` i
|
||||
WHERE i.`id_product` = '.(int)$product['id_product'].'
|
||||
AND i.`cover` = 1'
|
||||
);
|
||||
if (isset($img['id_image']) && !empty($img['id_image'])) {
|
||||
$image_obj = new Image((int)$img['id_image']);
|
||||
$img_path = (isset($image_obj)?$image_obj->getExistingImgPath():'');
|
||||
}
|
||||
$output .= '
|
||||
<div style="float:left;width:100px;margin-right:5px;margin-bottom:5px;">
|
||||
<a target="_blank" href="index.php?tab=AdminCatalog&id_product='.(int)($product['id_product']).'&updateproduct&token='.Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)($cookie->id_employee)).'" title="'.$this->l('View product').'">
|
||||
<img width="90" src="'.(isset($img_path)?_THEME_PROD_DIR_.$img_path.'-small.jpg':'').'"/>
|
||||
<p><b>#'.(int)($product['id_product']).'</b> - '.mb_strimwidth($product['name'], 0, 40, "...").'</p>
|
||||
</a>
|
||||
</div>';
|
||||
}
|
||||
$output .= '<p class="clear"> </p>
|
||||
</li>';
|
||||
}
|
||||
|
||||
$output .= '
|
||||
</ul>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$output .= '<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<label>'.$this->l('Subject:').'</label>
|
||||
<input type="hidden" name="id_customer_message" value="'.$message['id_customer_message'].'" />
|
||||
<div class="styled-select semi-square '.(!empty($message['employee_name'])?'bg-rose':'bg-purple-light').'">
|
||||
|
@ -173,7 +173,7 @@ class BlockOrderSummary extends Module {
|
||||
<h5>'.$this->l('My Cart' ).'</h5>
|
||||
<ul>';
|
||||
foreach ($cart->getProducts() as $key => $product) {
|
||||
echo '<li>'.$product['quantity'].' x '.$product['name'].' <span class="price">'.Tools::displayPrice($product['total_wt'],$currency).'</span></li>';
|
||||
echo '<li>'.$product['quantity'].' x '.mb_strimwidth($product['name'], 0, 35, "...").' <span class="price">'.Tools::displayPrice($product['total_wt'],$currency).'</span></li>';
|
||||
}
|
||||
echo '</ul>
|
||||
<p>'.$this->l('Products total').' <span class="price price_total">'.Tools::displayPrice($cart->getOrderTotal(TRUE,1),$currency).'</span></p>';
|
||||
|
Loading…
Reference in New Issue
Block a user