Dodanie funkcji czyszczenia cache oraz przycisku do ponownego wysyłania zamówienia do apilo.com; poprawa sortowania transportów w bazie danych
This commit is contained in:
@@ -206,6 +206,12 @@ if ( $this -> next_order_id )
|
||||
'class' => 'btn btn-success btn-sm mr5 ml5'
|
||||
];
|
||||
}
|
||||
$grid -> buttons[] = [
|
||||
'label' => 'Wyślij ponownie zamówienie do apilo.com',
|
||||
'url' => '/admin/shop_order/send_order_to_apilo/order_id=' . $this -> order['id'],
|
||||
'icon' => 'fa-refresh',
|
||||
'class' => 'btn btn-primary btn-sm mr5 ml5 pull-right btn-send-order-to-apilo'
|
||||
];
|
||||
$grid -> default_buttons = false;
|
||||
$grid -> external_code = $out;
|
||||
echo $grid -> draw();
|
||||
@@ -241,6 +247,38 @@ echo $grid -> draw();
|
||||
});
|
||||
}, 500 );
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.btn-send-order-to-apilo', function(e) {
|
||||
e.preventDefault();
|
||||
var href = $( this ).attr( 'href' );
|
||||
$.alert({
|
||||
title: 'Potwierdź',
|
||||
content: 'Czy na pewno chcesz wysłać zamówienie do apilo.com?',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-times',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
columnClass: 'col-12 col-lg-10',
|
||||
theme: 'modern',
|
||||
icon: 'fa fa-question',
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Tak',
|
||||
btnClass: 'btn-success',
|
||||
keys: ['enter'],
|
||||
action: function() {
|
||||
document.location.href = href;
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
text: 'Nie',
|
||||
btnClass: 'btn-dark',
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// set_order_as_unpaid
|
||||
|
||||
@@ -168,7 +168,10 @@
|
||||
<div class="site-content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 top-user">
|
||||
<div class="col-12 col-md-3 col-lg-2">
|
||||
<a href="/admin/settings/clear_cache/" class="btn btn-danger mt-3">Wyczyść cache</a>
|
||||
</div>
|
||||
<div class="col-12 col-md-9 col-lg-10 top-user">
|
||||
<div class="dropdown">
|
||||
<?
|
||||
if ( $user[ 'name' ] or $user[ 'surname' ] )
|
||||
|
||||
Reference in New Issue
Block a user