From 451a8a491f2b327ecbcb9747b64be0f9c2d1c6dc Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Fri, 20 Dec 2024 21:30:42 +0100 Subject: [PATCH] =?UTF-8?q?Zaktualizowano=20wersj=C4=99=20na=200.225,=20do?= =?UTF-8?q?dano=20przycisk=20do=20czyszczenia=20cache=20oraz=20funkcj?= =?UTF-8?q?=C4=99=20ponownego=20wysy=C5=82ania=20zam=C3=B3wienia=20do=20ap?= =?UTF-8?q?ilo.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/templates/shop-order/order-details.php | 38 ++++++++ admin/templates/site/main-layout.php | 5 +- autoload/admin/controls/class.Settings.php | 13 +++ autoload/admin/controls/class.ShopOrder.php | 12 +++ autoload/admin/factory/class.ShopOrder.php | 90 +++++++++++++++++++ updates/0.20/ver_0.225.zip | Bin 0 -> 24605 bytes updates/changelog.php | 4 + updates/versions.php | 2 +- 8 files changed, 162 insertions(+), 2 deletions(-) create mode 100644 updates/0.20/ver_0.225.zip diff --git a/admin/templates/shop-order/order-details.php b/admin/templates/shop-order/order-details.php index be003e2..a877733 100644 --- a/admin/templates/shop-order/order-details.php +++ b/admin/templates/shop-order/order-details.php @@ -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 diff --git a/admin/templates/site/main-layout.php b/admin/templates/site/main-layout.php index fbb9af0..87e167d 100644 --- a/admin/templates/site/main-layout.php +++ b/admin/templates/site/main-layout.php @@ -168,7 +168,10 @@
-
+ +