Merge branch 'develop' of git@gitlab.antadis.net:dev-antadis/bebeboutik.git into develop
This commit is contained in:
commit
f53db8d1f7
@ -72,6 +72,10 @@ class AdminOrders extends AdminTab
|
||||
foreach(Country::getCountries((int) $cookie->id_lang, TRUE) as $country) {
|
||||
$country_array[(int) $country['id_country']] = $country['name'];
|
||||
}
|
||||
$appliArray = array(
|
||||
0 => 'Site',
|
||||
1 => 'Appli'
|
||||
);
|
||||
|
||||
foreach ($states AS $state)
|
||||
$statesArray[$state['id_order_state']] = $state['name'];
|
||||
@ -93,13 +97,13 @@ class AdminOrders extends AdminTab
|
||||
'customer' => array('title' => $this->l('Customer'), 'widthColumn' => 100, 'width' => 140, 'filter_key' => 'customer', 'tmpTableFilter' => true),
|
||||
'total_paid' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '<b>', 'suffix' => '</b>', 'price' => true, 'currency' => true),
|
||||
'payment' => array('title' => $this->l('Payment'), 'width' => 80),
|
||||
'osname' => array('title' => $this->l('Status'), 'widthColumn' => 230, 'type' => 'select', 'select' => $statesArray, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int', 'width' => 200),
|
||||
'osname' => array('title' => $this->l('Status'), 'widthColumn' => 200, 'type' => 'select', 'select' => $statesArray, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int', 'width' => 200),
|
||||
'id_carrier' => array('title' => $this->l('Carrier'), 'align' => 'center', 'width' => 80, 'callback' => 'printCarrier', 'orderby' => false, 'type' => 'select', 'select' => $carriersArray, 'filter_key' => 'a!id_carrier', 'filter_type' => 'int'),
|
||||
'date_add' => array('title' => $this->l('Date'), 'width' => 35, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'),
|
||||
//'mixed' => array('title' => $this->l('Mixed'), 'callback' => 'printMixedSale', 'orderby' => false, 'search' => false),
|
||||
'id_pdf' => array('title' => $this->l('PDF'), 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false),
|
||||
'id_country' => array('title' => $this->l('Pays'), 'callback' => 'printCountry', 'orderby' => false, 'type' => 'select', 'select' => $country_array, 'filter_key' => 'x!id_country', 'filter_type' => 'int', 'width' => 35,),
|
||||
'appli' => array('title' => $this->l('Appli'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'filter_key' => 'appli', 'tmpTableFilter' => true, 'icon' => array(0 => 'disabled.gif', 1 => 'enabled.gif'), 'orderby' => false),
|
||||
'appli' => array('title' => $this->l('Appli'), 'width' => 25, 'align' => 'center', 'type' => 'select', 'select' => $appliArray, 'filter_key' => 'a!appli', 'callback' => 'printAppliIcons', 'orderby' => false),
|
||||
);
|
||||
parent::__construct();
|
||||
|
||||
@ -1555,7 +1559,7 @@ class AdminOrders extends AdminTab
|
||||
</form>';
|
||||
if($order->module && $order->module=="paypal"){
|
||||
$html.='
|
||||
<form style="margin-top:10px;" action="" method="post">
|
||||
<form style="margin-top:10px;" action="" method="post" id="form_refund_paypal">
|
||||
<div class="form-horizontal text-right col-md-offset-9 col-md-3">
|
||||
<input type="hidden" name="id_order" value="'.$order->id.'" />
|
||||
<button type="submit" class="btn btn-primary pull-right" name="submitPayPalRefund">Remboursement Total Paypal <span class="anticon anticon-paypal"></span></button>
|
||||
@ -1819,7 +1823,7 @@ class AdminOrders extends AdminTab
|
||||
<ul style="list-style: outside none; margin: 0; padding: 0;">';
|
||||
foreach($returnable as $id_order_detail => $product) {
|
||||
$html.= '
|
||||
<li style="padding: 5px; background: #eee;"><input data-order-detail="'.(int) $id_order_detail.'" class="return_input" style="width: 30px; text-align: right; border: 1px solid #E0D0B1; padding: 2px 4px;" type="number" name="return_product['.(int) $id_order_detail.']" value="0" autocomplete="off" step="1" max="'.(int) $product[1].'" min="0" /> x '.$product[0]. '</li>
|
||||
<li style="padding: 5px; background: #eee;"><input data-order-detail="'.(int) $id_order_detail.'" class="return_input" style="width: 35px; text-align: right; border: 1px solid #E0D0B1; padding: 2px 1px;" type="number" name="return_product['.(int) $id_order_detail.']" value="0" autocomplete="off" step="1" max="'.(int) $product[1].'" min="0" /> x '.$product[0]. '</li>
|
||||
<li id="reason_'.$id_order_detail.'">';
|
||||
for($i = 1; $i <= $product[1]; $i++) {
|
||||
$html.= '
|
||||
@ -1981,6 +1985,15 @@ class AdminOrders extends AdminTab
|
||||
}
|
||||
});
|
||||
|
||||
$("#form_refund_paypal").submit(function(){
|
||||
var x = confirm("Êtes-vous sûr de vouloir rembourser l\'ensemble de la commande ?");
|
||||
if(x){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#generateDiscount, #generateDiscount2, #generateCreditSlip").click(function(){
|
||||
if($(this).is(":checked")){
|
||||
$("#spanShippingBack").css("display", "block");
|
||||
|
@ -85,6 +85,12 @@ class Order extends OrderCore {
|
||||
return '<img src="/img/flags/'.(int) $value.'.png" alt="" />';
|
||||
}
|
||||
|
||||
public function printAppliIcons($value, $params)
|
||||
{
|
||||
$name = ((int)$value?'mobile':'computer');
|
||||
return '<img src="/img/'.$name.'.png" alt="" width="18px"/>';
|
||||
}
|
||||
|
||||
public function printCarrier($value, $params)
|
||||
{
|
||||
$laposte_carriers = unserialize(Configuration::get('LAPOSTEWS_CARRIERS', serialize(array())));
|
||||
|
Loading…
Reference in New Issue
Block a user