big inte of adminOrder view

This commit is contained in:
Marion Muszynski 2017-11-09 14:51:48 +01:00
parent 4e84124e85
commit 6330105f81
4 changed files with 1166 additions and 2 deletions

View File

@ -30,6 +30,9 @@ ul#menu li a {
.text-purple-dark{
color: #504d8b!important;
}
.text-grey-light{
color: #EFEFEF!important;
}
#content {
background-color: #f5f5f9;
}
@ -73,7 +76,6 @@ a:active,
color: #fff;
background: #504d8b;
border-color: #504d8b;}
.btn-success {
background: #26B99A;
border: 1px solid #169F85;}
@ -83,6 +85,46 @@ a:active,
.btn-success.active,
.open .dropdown-toggle.btn-success {
background: #169F85;}
.btn-green-light {
background: rgba(38, 185, 154, 0.6);
border: 1px solid #169F85;
color:#fff;}
.btn-green-light:hover,
.btn-green-light:focus,
.btn-green-light:active,
.btn-green-light.active,
.open .dropdown-toggle.btn-green-light {
background: #169F85;}
.btn-grey {
background: #efefef;
border: 1px solid #CCCCCC;
color:#333333;}
.btn-grey:hover,
.btn-grey:focus,
.btn-grey:active,
.btn-grey.active,
.open .dropdown-toggle.btn-grey {
background: #CCCCCC;}
.btn-red {
background: rgba(217, 83, 79, 0.3);
border: 1px solid #d43f3a;
color:#d43f3a;}
.btn-red:hover,
.btn-red:focus,
.btn-red:active,
.btn-red.active,
.open .dropdown-toggle.btn-red {
background: #d43f3a;}
.btn-warning-more {
color: #eea236;
background-color: rgba(240, 173, 78, 0.2);
border-color: #eea236;}
.btn-warning-more:hover,
.btn-warning-more:focus,
.btn-warning-more:active,
.btn-warning-more.active,
.open .dropdown-toggle.btn-warning-more {
background: #eea236;}
h2 {
font-size: 18px;
@ -139,6 +181,13 @@ form label{
white-space: nowrap;
color: #504d8b;
}
.panel h2.high_title{
margin: 5px 0 6px;
font-weight: bold;
text-overflow: ellipsis;
overflow: hidden;
color: #504d8b;
}
.div-title h4{
font-size: 15px;
}
@ -296,6 +345,16 @@ div.tagsinput span.tag a {
background-color: #FFA74E;
border: 1px solid #FFA74E;
}
#content .alert-warning-light {
color: #fc9732;
background-color: rgba(255, 167, 78, 0.3);
border: 1px solid #FFA74E;
}
#content .alert-info {
color: #31708f;
background-color: #d9edf7;
border-color: #bce8f1;
}
#content .alter-warning i.glyphicon,
#content .alert-warning span.glyphicon,
#content .alert-warning i.anticon,
@ -389,6 +448,10 @@ table.table tr th {
background: #504d8b;
color: #fff;
}
table.table.th-grey tr th {
background: #efefef;
color: #504d8b;
}
.table tr td {
color: #000;
}

File diff suppressed because it is too large Load Diff

View File

@ -2237,12 +2237,12 @@ class AdminAntReturnprocess extends AdminTab
SELECT COUNT(*)
FROM `'._DB_PREFIX_.'mr_method`
WHERE `id_carrier` = '.(int) $cart->id_carrier.'
AND `MR_Selected_Num` IS NOT NULL
')) {
$mr = Db::getInstance()->getRow('
SELECT mr_s.*
FROM `' . _DB_PREFIX_ . 'mr_selected` mr_s
WHERE `id_cart` = ' . (int) $cart->id . '
AND `MR_Selected_Num` IS NOT NULL
');
if($mr) {
$order_address = nl2br(preg_replace("/(\r\n){2,}/", "\r\n", implode("\r\n", array(
@ -2251,6 +2251,7 @@ class AdminAntReturnprocess extends AdminTab
$mr['MR_Selected_LgAdr3'] . ' ' . $mr['MR_Selected_LgAdr4'],
$mr['MR_Selected_CP'] . ' ' . $mr['MR_Selected_Ville'],
'FRANCE',
'('.$mr['MR_Selected_Num'].')',
))));
} else {
$order_address = nl2br(AddressFormat::generateAddress(new Address((int) $order->id_address_delivery)));

View File

@ -97,6 +97,48 @@ class Fraud extends Module {
}
}
public function hookAdminOrderNew($params) {
global $currentIndex;
$data .= '';
$reputation = FraudCore::getReputationOrder((int) $params['id_order']);
if ($reputation) {
$data .= '
<div class="col-md-12">
<div class="panel">
<div class="panel-title">
<h2><span class="anticon anticon-shield"></span> '.$this->l('Suspect Order').''.($reputation['pass']!=0?' <span style="font-size:12px;" class="text-rose"><em>('.$this->l('Order validate manually').')</span></em>':'').'</h2>
<div class="clearfix"></div>
</div>
<div class="panel-content">';
if (Tools::getIsset('validFraud')) {
$id_order = Tools::getValue('id_order');
if (!FraudCore::validOrder($id_order)) {
$data .= '<br /><p class="alert">'.$this->l('Update impossible').'</p>';
} else {
$data .= '<br /><p class="conf">'.$this->l('Valid order with success').'</p>';
}
}
if ($reputation['score'] >= 100) {
$info = json_decode($reputation['report']);
$data .= '
<a class="btn btn-danger" role="button" data-toggle="collapse" href="#collapseFraudModule">
<b>'.$this->l('Score : ').'</b> <span class="badge">'.$reputation['score'].'</span>
</a>
<div class="collapse" id="collapseFraudModule">
<h4>'.$this->l('Details : ').'</h4>
<p>'.implode('<br />', $info).'</p>
</div>';
if ($reputation['pass'] == 0) {
$data .= '<a class="pull-right btn btn-primary btn-sm" onclick="if(!confirm(\'Voulez-vous valider la commande ? \')) return false;" href="'.$_SERVER['REQUEST_URI'].'&validFraud=1" class="button">'.$this->l('Valid Order').'</a>';
}
}
$data .= '</div>
</div>
</div>';
}
return $data;
}
/* This method is called after the response returned by paybox */
public function testPaybox($id_order, $ip_country)
{